Chantal Justamond

Joined

1,380 Experience
6 Lessons Completed
1 Question Solved

Activity

Posted in Liking Posts Discussion

solved it by using

<%= link_to 'Like', listing_like_index_path(listing.mls_id), method: :post %>
dumb mistake on my part

Posted in Liking Posts Discussion

Great Video. However I'm stuck and would love some help.
I have listings results incoming from an API. On my index view I want to add the like or heart button however when i add

<%= link_to 'Like', listing_like_index_path(@listing), method: :post %> it's just break and it's because I don't have :listing_id

these are my routes for like
resources :listings, only: [:index, :show] do
resources :like, module: :listings
end

I added resources instead of resource because after the click the button I want them to stay on the index view

Any help will be deeply apreciated

Posted in How do I sort values incoming from an API call?

OMG! It worked.. I did directly on the controller which i'm not super happy about but it's a good start.
thank you so much

Posted in How do I sort values incoming from an API call?

Well I want to render them first as they come and then with a dropdown button i want to sort them.  I guess I'm a little confused on the how

Posted in How do I sort values incoming from an API call?

- I have incoming results from an API and I want to sort them (e.g. price) how can i do this without saving the results to the DB?
- this is a rails app.