Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Small fix for scaffold generator #7

Merged
merged 1 commit into from

2 participants

@conzett

One character template fix: redirect in destroy action should reference instance variable instead of non-existent local variable.

@conzett conzett Fix undefined variable in delete scaffold template
Should reference instance variable instead of non-existent local variable.
77d3c81
@amatsuda
Owner

Oops! Thanks! :sushi:

@amatsuda amatsuda merged commit b94eb52 into amatsuda:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 2, 2012
  1. @conzett

    Fix undefined variable in delete scaffold template

    conzett authored
    Should reference instance variable instead of non-existent local variable.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/generators/scaffold_controller/templates/controller.rb
View
2  lib/generators/scaffold_controller/templates/controller.rb
@@ -83,7 +83,7 @@ def destroy
@<%= singular_name %>.destroy
respond_to do |format|
- format.html { redirect_to <%= nested_parent_name %>_<%= index_helper %>_url(<%= nested_parent_name %>) }
+ format.html { redirect_to <%= nested_parent_name %>_<%= index_helper %>_url(@<%= nested_parent_name %>) }
format.json { head :ok }
end
end
Something went wrong with that request. Please try again.