Hello everyone!

Does the method save return the ID ?
Because i'm doing this :


if @post.save
flash[:notice] = 'Post was successfully created.'
end

and I need the ID of the post I just created. I think it could work with
: Post.find(:last) but what if two people are posting at the same time?

Thank you!
-- 
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