Displaying 2 results from an estimated 2 matches for "thing_pag".
Did you mean:
thing_pages
2006 Apr 24
5
Custom pagination
I am trying to paginate objects from a has_many/:through relationship
using Paginator.
current_user.things returns the objects that I''d like to paginate. For
testing, I tried to make it 1 item per page. I initialise the paginator
as follows:
@thing_pages = Paginator.new(self, current_user.things.count, 1,
@params[''page''])
I don''t know how to obtain @things now though, I don''t want to be using
Things.find_all (as the wiki example shows) as I know which things I
want to be paginating (current_user.things). H...
2006 Aug 07
0
Doubts after generating with scaffold
...- When we create a new element we call the ?new? action and then the
?create? action. In both of them we are using the ?Thing.new? so? are we
instantiating the thing twice?. I don?t understand this piece of code.
- For ?list? we use the pagination helper. The line of code is something
like:
?@thing_pages, @things = paginate :things, :per_page => 10, :order_by =>
''demo_name''? I don?t understand the line. I can understand the code
after the ?@things =?, but not the ?@thing_pages,? code.
- I?ve also seen in tutorials with older versions that variables such as
?flash? or...