ruby on rails - permitted_params - rails4 and inherited_resources -


i've tried use ir in rails4 app, code

class workspacescontroller < inheritedresources::base    private    def permitted_params     params.permit(:workspace => [:name, :owner_id])   end end 

raises activemodel::forbiddenattributeserror exception.

the same problem following code

  def permitted_params     params.permit(:name, :owner_id)   end 

whats wrong code?

ps: i've tried following protip http://blog.josemarluedke.com/posts/inherited-resources-with-rails-4-and-strong-parameters 4.0rc1 doesn't work :(

i had same problem.

you need put permitted_params method public method in controller class. it's not private method.

i hope help.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -