Friday, May 18, 2012

Re: [Rails] Proxy Model Class



On 19 May 2012 00:28, mengu <whalberg@gmail.com> wrote:
hello everyone,

is it possible to instantiate a model class with it's id instead of
pulling it from the db?

SomeObject obj = SomeObject.new
obj.id = 10

Is that what you mean? What's your use-case for this? 
 

thanks in advance.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate