Chantal Justamond
Joined
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
thank you so much
- this is a rails app.