Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix redirect after add new model
  • Loading branch information
WaYdotNET committed Nov 2, 2011
1 parent eebb5ab commit 6cf5cc3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -14,7 +14,7 @@ Admin.controllers :<%= @orm.name_plural %> do
@<%= @orm.name_singular %> = <%= @orm.build("params[:#{@orm.name_singular}]") %>
if <%= @orm.save %>
flash[:success] = '<%= @orm.klass_name %> was successfully created.'
render '<%= @orm.name_plural %>/index'
redirect url(:<%= @orm.name_plural %>, :index)
else
render '<%= @orm.name_plural %>/new'
end
Expand Down

0 comments on commit 6cf5cc3

Please sign in to comment.