Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed double assignment on create

  • Loading branch information...
commit 9dc1100f2c453679a26e949ba031b038ba04d0ac 1 parent fdc8a85
@sigmike sigmike authored
View
2  lib/generators/cancan/scaffold_controller/templates/controller.rb
@@ -36,8 +36,6 @@ def edit
# POST <%= route_url %>
# POST <%= route_url %>.json
def create
- @<%= singular_table_name %>.attributes = params[:<%= singular_table_name %>]
-
respond_to do |format|
if @<%= orm_instance.save %>
format.html { redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully created.'" %> }
Please sign in to comment.
Something went wrong with that request. Please try again.