Skip to content

Commit

Permalink
route for scaffold generator is now generated automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdinand Niedermann committed Aug 23, 2010
1 parent 7dfb98f commit d55bdd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -39,10 +39,6 @@ def go
@singular_lower_case_parent = user_model_name.singularize.underscore
@plural_lower_case_parent = user_model_name.pluralize.underscore

route("resources :#{@plural_lower_case_parent} do
resources :#{@plural_lower_case_name}, :collection => { :delete_selected => :post }
end")

#directory "app/models"
template "model.rb", "app/models/#{singular_lower_case_name}.rb"

Expand Down
Expand Up @@ -26,6 +26,10 @@ def go
@singular_lower_case_parent = user_model_name.singularize.underscore
@plural_lower_case_parent = user_model_name.pluralize.underscore

route("resources :#{@plural_lower_case_parent} do
resources :#{@plural_lower_case_name}, :collection => { :delete_selected => :post }
end")

#directory "app/controllers"
template "controller.rb", "app/controllers/#{@plural_lower_case_name}_controller.rb"

Expand Down

0 comments on commit d55bdd6

Please sign in to comment.