From e1056530665d5c8eed2c325157fbb88553eb2678 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 20 Feb 2007 22:09:12 +0000 Subject: Added .erb and .builder as preferred aliases to the now deprecated .rhtml and .rxml extensions [Chad Fowler]. This is done to separate the renderer from the mime type. .erb templates are often used to render emails, atom, csv, whatever. So labeling them .rhtml doesn't make too much sense. The same goes for .rxml, which can be used to build everything from HTML to Atom to whatever. .rhtml and .rxml will continue to work until Rails 3.0, though. So this is a slow phasing out. All generators and examples will start using the new aliases, though. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/scaffolding.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller/scaffolding.rb') diff --git a/actionpack/lib/action_controller/scaffolding.rb b/actionpack/lib/action_controller/scaffolding.rb index d02a31e6fc..11ece16f0e 100644 --- a/actionpack/lib/action_controller/scaffolding.rb +++ b/actionpack/lib/action_controller/scaffolding.rb @@ -71,7 +71,7 @@ module ActionController # end # end # - # The render_scaffold method will first check to see if you've made your own template (like "weblog/show.rhtml" for + # The render_scaffold method will first check to see if you've made your own template (like "weblog/show.erb" for # the show action) and if not, then render the generic template for that action. This gives you the possibility of using the # scaffold while you're building your specific application. Start out with a totally generic setup, then replace one template # and one action at a time while relying on the rest of the scaffolded templates and actions. @@ -176,7 +176,7 @@ module ActionController end def scaffold_path(template_name) - File.dirname(__FILE__) + "/templates/scaffolds/" + template_name + ".rhtml" + File.dirname(__FILE__) + "/templates/scaffolds/" + template_name + ".erb" end def caller_method_name(caller) -- cgit v1.2.3