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 --- .../templates/scaffolds/edit.rhtml | 7 --- .../templates/scaffolds/layout.rhtml | 69 ---------------------- .../templates/scaffolds/list.rhtml | 27 --------- .../templates/scaffolds/new.rhtml | 6 -- .../templates/scaffolds/show.rhtml | 9 --- 5 files changed, 118 deletions(-) (limited to 'actionpack/lib/action_controller/templates/scaffolds') diff --git a/actionpack/lib/action_controller/templates/scaffolds/edit.rhtml b/actionpack/lib/action_controller/templates/scaffolds/edit.rhtml index 63dff602a1..e69de29bb2 100644 --- a/actionpack/lib/action_controller/templates/scaffolds/edit.rhtml +++ b/actionpack/lib/action_controller/templates/scaffolds/edit.rhtml @@ -1,7 +0,0 @@ -

Editing <%= @scaffold_singular_name %>

- -<%= error_messages_for(@scaffold_singular_name) %> -<%= form(@scaffold_singular_name, :action => "update#{@scaffold_suffix}") %> - -<%= link_to "Show", :action => "show#{@scaffold_suffix}", :id => instance_variable_get("@#{@scaffold_singular_name}") %> | -<%= link_to "Back", :action => "list#{@scaffold_suffix}" %> diff --git a/actionpack/lib/action_controller/templates/scaffolds/layout.rhtml b/actionpack/lib/action_controller/templates/scaffolds/layout.rhtml index 759781e0e7..e69de29bb2 100644 --- a/actionpack/lib/action_controller/templates/scaffolds/layout.rhtml +++ b/actionpack/lib/action_controller/templates/scaffolds/layout.rhtml @@ -1,69 +0,0 @@ - - - - Scaffolding - - - - -

<%= flash[:notice] %>

- -<%= yield %> - - - diff --git a/actionpack/lib/action_controller/templates/scaffolds/list.rhtml b/actionpack/lib/action_controller/templates/scaffolds/list.rhtml index fea23dc66f..e69de29bb2 100644 --- a/actionpack/lib/action_controller/templates/scaffolds/list.rhtml +++ b/actionpack/lib/action_controller/templates/scaffolds/list.rhtml @@ -1,27 +0,0 @@ -

Listing <%= @scaffold_plural_name %>

- - - - <% for column in @scaffold_class.content_columns %> - - <% end %> - - -<% for entry in instance_variable_get("@#{@scaffold_plural_name}") %> - - <% for column in @scaffold_class.content_columns %> - - <% end %> - - - - -<% end %> -
<%= column.human_name %>
<%= entry.send(column.name) %><%= link_to "Show", :action => "show#{@scaffold_suffix}", :id => entry %><%= link_to "Edit", :action => "edit#{@scaffold_suffix}", :id => entry %><%= link_to "Destroy", {:action => "destroy#{@scaffold_suffix}", :id => entry}, { :confirm => "Are you sure?", :method => :post } %>
- -<%= link_to "Previous page", { :page => instance_variable_get("@#{@scaffold_singular_name}_pages").current.previous } if instance_variable_get("@#{@scaffold_singular_name}_pages").current.previous %> -<%= link_to "Next page", { :page => instance_variable_get("@#{@scaffold_singular_name}_pages").current.next } if instance_variable_get("@#{@scaffold_singular_name}_pages").current.next %> - -
- -<%= link_to "New #{@scaffold_singular_name}", :action => "new#{@scaffold_suffix}" %> diff --git a/actionpack/lib/action_controller/templates/scaffolds/new.rhtml b/actionpack/lib/action_controller/templates/scaffolds/new.rhtml index 66f6626f4e..e69de29bb2 100644 --- a/actionpack/lib/action_controller/templates/scaffolds/new.rhtml +++ b/actionpack/lib/action_controller/templates/scaffolds/new.rhtml @@ -1,6 +0,0 @@ -

New <%= @scaffold_singular_name %>

- -<%= error_messages_for(@scaffold_singular_name) %> -<%= form(@scaffold_singular_name, :action => "create#{@scaffold_suffix}") %> - -<%= link_to "Back", :action => "list#{@scaffold_suffix}" %> diff --git a/actionpack/lib/action_controller/templates/scaffolds/show.rhtml b/actionpack/lib/action_controller/templates/scaffolds/show.rhtml index 46cdfdb493..e69de29bb2 100644 --- a/actionpack/lib/action_controller/templates/scaffolds/show.rhtml +++ b/actionpack/lib/action_controller/templates/scaffolds/show.rhtml @@ -1,9 +0,0 @@ -<% for column in @scaffold_class.content_columns %> -

- <%= column.human_name %>: - <%= instance_variable_get("@#{@scaffold_singular_name}").send(column.name) %> -

-<% end %> - -<%= link_to "Edit", :action => "edit#{@scaffold_suffix}", :id => instance_variable_get("@#{@scaffold_singular_name}") %> | -<%= link_to "Back", :action => "list#{@scaffold_suffix}" %> -- cgit v1.2.3