ActionController::Parameters.new.require(:person)
Hello,
Note:I configured the App with config.action_controller.action_on_unpermitted_parameters = :raise.
Assuming I have a Model Person with attributes :name, :age.
If params = { name: "penguin", age: "99", style: "emperor" }
params.require(:person).permit(:name, :age) will not raise anything because params.require(:person) actually disregard the style: attribute without raising anything and returns { name: "penguin", age: "99" }
Now if I do params.permit(:id, :name, :age, :person => {}), it does raise "found unpermitted parameters: :style".
Is there a way to make .require not filtering the params without raising anything?
Thanks