Hello community I am new to ruby on rails, I have a problem with updating the database, when I try to update a record, all records are updated
this is my article_controller this is my router
I was reviewing the documentation and I saw that I do it similarly, I have searched for information on the internet and I can't find a solution
I want to update only one record by passing the id
You want to do:
when you do
Article.updateyou are in fact updating allEDIT: I'd also recommend following the conventions, using
resources :articlesis preferred https://guides.rubyonrails.org/routing.html#resources-on-the-web