You must permit params to get past this error. This snippet assumes that we have a controller called ExamplesController.

app/controllers/examples_controller.rb
1
2
3
4
5
6
7
8
9
10
..
  def create
    respond_with Example.create(example_params)
  end
...
private
  def example_params
    params.require(:example).permit(:title, :description)
  end
...

Comments