I was trying to do something line Entity.new.save.id to create a new Entity, save it, and return the id to the local variable @entity.  After working with it, it doesn't work.  Is there another way to do this without having to go to something like:

@entity = Entity.new
@entity.save
@somevar = @entity.id

I am new to Ruby and Rails, so please forgive me if this is a dumb question.  I come from the land of Coldfusion and something like this would work there. Any insight would be appreciated.

--
Eric Fleming
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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-spinoffs
-~----------~----~----~----~------~----~------~--~---

Reply via email to