I'm trying to build a simple inventory app, and I was wanting to have a page with a list of items, with only a name label and an editable box to update the instock amount and a single update button to update them all.
My model is named item and with two fields, name and instock
I'm not sure if you need more info, thanks.
* After playing around with it, I'm able to build the form, but when I click on update, it gives the error: Couldn't find Item with ID=edit_multiple
Here is part of my controller:
def edit_multiple
@items = Item.find(params[:id])
And here is my routes.rb
resources :items do
collection do
get :search
post :edit_multiple
put :update_multiple
end
if anyone has any pointers or help, I'd appreciate it.
thanks,
Check out these screencasts:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With