search for: acts_as_ord

Displaying 7 results from an estimated 7 matches for "acts_as_ord".

Did you mean: acts_as_order
2006 Mar 30
2
acts_as_ordered plugin
Hey all, I''ve just put together a little plugin to easily access the neighbours of a given model in a particular order. Read on if interested. Install: script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered Usage: class Person < ActiveRecord::Base acts_as_ordered :order => ''first_name'' end Say you have people with first names of Adam, Jonathan and Robert: p = Person.find_by_first_name(''Jonathan'') p.next # Robert p.previous...
2006 Jul 02
1
acts_as_modified, acts_as_ordered and validates_date_time
A quick note about acts_as_modified, acts_as_ordered and validates_date_time. If you are using any of those plugins you should update them. They''ve all had improvements/bug fixes. Also, acts_as_modified is now being maintained by both Chris Hall and myself. http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered http://svn.viney....
2006 Aug 09
10
Next/ Previous record
Hi, Quick question (which means that I think there should be an easy answer)... When I am in the "show" view, I''d like to add 2 links, one for previous and one for next record so that the user can go on to the next "result" without having to go back to the ''list'' of results. However, I can''t find my way about this problem :-S
2006 Aug 02
9
How to fetch the previous or next record
Hello, Is there some built-in facility for fetching the Previous or Next record from a table? Assume the command find_by_name has been issued, and the variable @name contains the name "John Doe". I''m looking for something like find_next(@name) and find_previous(@name). What''s a good way to pursue if one has to roll their own methods? Thanks for the help, gk --
2007 May 01
3
ActiveRecord Previous/Next Record
Does ActiveRecord offer a simple solution to get previous/next records relative to a certain record? For instance, say I have this table: PEOPLE id | name 1 | john 2 | mary 3 | bob Using p = Person.find(2), is it possible to get the previous (john) and next (bob) records using perhaps something like p.previous and p.next? If not, how can I do this without resorting to ugly queries? Thanks in
2006 Apr 12
2
Collection has next question
Hi, I know about pagination but dont want to use that option if it all possible. How in a collection of posts can i check if the there is a next item in the collection and then add that an object. For instance: //Returns all the posts into a collection called posts @posts = Post.find(:all) //Returns a specific post based on an id @post = Post.find(params[:id]) //How can i return the next
2008 Apr 16
3
Linking to "Next Entry >>" from the current Entry Page
Hi all, I''m trying to link to the "Next Entry >>" from the current entry page (in show.html.erb). Any one know how I would do it? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send