diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-21 00:29:44 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-21 00:29:44 +0000 |
commit | 21187c0fb4fc559927a2f947f909dedd85969ffb (patch) | |
tree | efd0ceb5c3a88531916186e97aa106041c293975 /railties/lib/rails_generator/generators/components/controller | |
parent | b5419cd66ea160d1ee94f3ca521bb44adf3a21ca (diff) | |
download | rails-21187c0fb4fc559927a2f947f909dedd85969ffb.tar.gz rails-21187c0fb4fc559927a2f947f909dedd85969ffb.tar.bz2 rails-21187c0fb4fc559927a2f947f909dedd85969ffb.zip |
Apply the rest of Chads patch
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/controller')
4 files changed, 6 insertions, 6 deletions
diff --git a/railties/lib/rails_generator/generators/components/controller/USAGE b/railties/lib/rails_generator/generators/components/controller/USAGE index ec64209135..ae7b8e022b 100644 --- a/railties/lib/rails_generator/generators/components/controller/USAGE +++ b/railties/lib/rails_generator/generators/components/controller/USAGE @@ -15,7 +15,7 @@ Example: Credit card controller with URLs like /credit_card/debit. Controller: app/controllers/credit_card_controller.rb - Views: app/views/credit_card/debit.rhtml [...] + Views: app/views/credit_card/debit.erb [...] Helper: app/helpers/credit_card_helper.rb Test: test/functional/credit_card_controller_test.rb @@ -24,7 +24,7 @@ Modules Example: Credit card admin controller with URLs /admin/credit_card/suspend. Controller: app/controllers/admin/credit_card_controller.rb - Views: app/views/admin/credit_card/debit.rhtml [...] + Views: app/views/admin/credit_card/debit.erb [...] Helper: app/helpers/admin/credit_card_helper.rb Test: test/functional/admin/credit_card_controller_test.rb diff --git a/railties/lib/rails_generator/generators/components/controller/controller_generator.rb b/railties/lib/rails_generator/generators/components/controller/controller_generator.rb index c6703b4a17..f73e5a41b0 100644 --- a/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +++ b/railties/lib/rails_generator/generators/components/controller/controller_generator.rb @@ -28,8 +28,8 @@ class ControllerGenerator < Rails::Generator::NamedBase # View template for each action. actions.each do |action| - path = File.join('app/views', class_path, file_name, "#{action}.rhtml") - m.template 'view.rhtml', path, + path = File.join('app/views', class_path, file_name, "#{action}.erb") + m.template 'view.erb', path, :assigns => { :action => action, :path => path } end end diff --git a/railties/lib/rails_generator/generators/components/controller/templates/view.erb b/railties/lib/rails_generator/generators/components/controller/templates/view.erb new file mode 100644 index 0000000000..ad85431f98 --- /dev/null +++ b/railties/lib/rails_generator/generators/components/controller/templates/view.erb @@ -0,0 +1,2 @@ +<h1><%= class_name %>#<%= action %></h1> +<p>Find me in <%= path %></p> diff --git a/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml b/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml index ad85431f98..e69de29bb2 100644 --- a/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml +++ b/railties/lib/rails_generator/generators/components/controller/templates/view.rhtml @@ -1,2 +0,0 @@ -<h1><%= class_name %>#<%= action %></h1> -<p>Find me in <%= path %></p> |