Franz Strebel wrote:

> last_id = MyModel.find(:first, :order => 'id desc').id

@Franz

Thanks this worked great well kinda, I'm confused on why there is the 
'.id' at the end also how would I limit this to give me say the first 3 
from the back of the list instead of

:all or :first and :limit => 3

 didn't work because i am calling this in my 'MyModel.rb' file so in my 
index.html.erb file its set for .each with a do loop and every other 
thing i have tried has bombed

People may say RoR is fun and easy and at the beginning it is but 
sometimes its really frustrating
-- 
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 email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to