Permalink
Browse files

Controller generators should use routes shortcut.

  • Loading branch information...
1 parent 4998e09 commit e8a80cdded7d4a3ecf8d125681ab8bcae2b91504 @josevalim josevalim committed Mar 22, 2010
@@ -10,7 +10,7 @@ def create_controller_files
def add_routes
actions.reverse.each do |action|
- route %{get "/#{file_name}/#{action}" => "#{file_name}##{action}"}
+ route %{get "#{file_name}/#{action}"}
end
end
@@ -55,7 +55,7 @@ def test_invokes_default_template_engine
def test_add_routes
run_generator
- assert_file "config/routes.rb", /get "\/account\/foo" => "account#foo"/, /get "\/account\/bar" => "account#bar"/
+ assert_file "config/routes.rb", /get "account\/foo"/, /get "account\/bar"/
end
def test_invokes_default_template_engine_even_with_no_action

0 comments on commit e8a80cd

Please sign in to comment.