lib/generators/adhoc/portfolio/templates/actions/create.rb in adhoc-generators-0.0.4 vs lib/generators/adhoc/portfolio/templates/actions/create.rb in adhoc-generators-0.0.5
- old
+ new
@@ -1,8 +1,8 @@
def create
- @<%= instance_name %> = <%= model_name %>.new(params[:<%= instance_name %>])
+ @<%= instance_name %> = <%= model_name %>.new(<%= instance_name %>_params)
if @<%= instance_name %>.save
- redirect_to <%= item_url %>, :notice => "Successfully created <%= model_name.underscore.humanize.downcase %>."
+ redirect_to <%= item_url %>, notice: "Successfully created <%= model_name.underscore.humanize.downcase %>."
else
render :new
end
end