if params[:sSearch].present?
drops = drops.where("items.name like :search or characters.name like :search", search:"%#{params[:sSearch]}%")
end
Nested routes took me a little longer to get working.
eg.
routes.rb
resources :charactersdo
resources :dropsend
When I went to /characters/1/drops, I was getting the full list of drops.
The index action was being called twice and then fetch. On the first call, the index action had all of the parameters, but params didn't have the character_id on the subsequent call to index or the call to fetch.
To resolve that, I changed the table tag in my view code to:
Brett, I used:
Nested routes took me a little longer to get working.
eg.
When I went to /characters/1/drops, I was getting the full list of drops.
The index action was being called twice and then fetch. On the first call, the index action had all of the parameters, but params didn't have the character_id on the subsequent call to index or the call to fetch.
To resolve that, I changed the table tag in my view code to: