Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

nfuller52's Profile

GitHub User: nfuller52

Comments by

Avatar

I monkey patched it as stated above... there may be a better solution but on the controller i threw a public method call new_#{controller.to_s.singularize}_from_params. There may be a better way to do this than on each controller but my code for a topic would look like this

ruby
def new_topic_from_params
  @topic = Topic.new(permitted_params.topic)
end

Then just do all your normal stuff in the create method. This method should pass it along. Hope it helps someone!