Answer the question
In order to leave comments, you need to log in
What is causing the 500 (Internal Server Error) error?
I am writing a small CRUD application using Rails/Angular.
WHEN I try to create or update data, 500 (Internal Server Error) pops up
, I use gem 'inherited_resources' so as not to write all the actions myself!
this is my controller
class ProductsController < InheritedResources::Base
respond_to :json
end
Answer the question
In order to leave comments, you need to log in
added the following to the controller
private
def permitted_params
params.permit(:product => [:name, :description, :price])
end
and everything worked
The answer to your question is in the development log of your APP
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question