diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-02 09:11:17 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-02 09:11:17 +0000 |
commit | 3532455404ec8449eee1054e38d1e0db40c63e15 (patch) | |
tree | 9db81fad7bd114b723f1cc5d782b412dda15752b /actionpack/lib/action_controller/templates/scaffolds/list.rhtml | |
parent | 5b36c9275d979c40c7e20e9cc0415d4e8dbfd457 (diff) | |
download | rails-3532455404ec8449eee1054e38d1e0db40c63e15.tar.gz rails-3532455404ec8449eee1054e38d1e0db40c63e15.tar.bz2 rails-3532455404ec8449eee1054e38d1e0db40c63e15.zip |
Added pagination for scaffolding (10 items per page) #964 [mortonda@dgrmm.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/templates/scaffolds/list.rhtml')
-rw-r--r-- | actionpack/lib/action_controller/templates/scaffolds/list.rhtml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/templates/scaffolds/list.rhtml b/actionpack/lib/action_controller/templates/scaffolds/list.rhtml index 33af7079b2..df1b7f8e4c 100644 --- a/actionpack/lib/action_controller/templates/scaffolds/list.rhtml +++ b/actionpack/lib/action_controller/templates/scaffolds/list.rhtml @@ -19,6 +19,9 @@ <% end %> </table> +<%= 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 %> + <br /> <%= link_to "New #{@scaffold_singular_name}", :action => "new#{@scaffold_suffix}" %> |