Displaying 2 results from an estimated 2 matches for "singular_nam".
Did you mean:
singular_name
2006 Feb 03
1
modifying scaffold method
...r/rails/actionpack/lib/action_controller/scaffolding.rb
(revision 125)
+++ vendor/rails/actionpack/lib/action_controller/scaffolding.rb
(working copy)
@@ -99,7 +99,7 @@
module_eval <<-"end_eval", __FILE__, __LINE__
def list#{suffix}
- @#{singular_name}_pages, @#{plural_name} = paginate
:#{plural_name}, :per_page => 10
+ @#{plural_name} = #{class_name}.find(:all)
render#{suffix}_scaffold "list#{suffix}"
end
@@ -109,8 +109,12 @@
end
def destroy#{suffix}
- #{class_n...
2006 May 23
5
Wierd pagination problem - Unknown options: order?
I am trying to use pagination with the order option. I am following
examples I''ve seen all over the web, but I am getting an error. My code
seems simple:
def list
@upload_pages, @uploads = paginate :uploads, :per_page => 20, :order
=> ''id''
end
Yet I keep getting this error:
___________________________________________