RailsCasts Pro episodes are now free!

Learn more or hide this

Nick's Profile

GitHub User: nfuller52

Site: http://www.tasukuforce.com

Comments by Nick


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

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

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