Displaying 3 results from an estimated 3 matches for "to_class".
Did you mean:
do_class
2008 Dec 02
2
Does a method string.to_class exist?
I have A Definition model, is it possible to do something like this in
Rails 2.1.0, Ruby 1.8.6 :
foo = "Definition"
@definition = foo.to_class.find(:all)
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@...
2007 Feb 23
2
[RoR],[C.L.R] How I convert a string object into a class?
People,
Lately I''ve been using the .name() method of classes.
For example:
Person.name
=> "Person"
Today...
I''d like to do the inverse:
"Person".to_class
=> Person
How do I transform a string into a class?
I''m working with a Rails app where I need to
get names of AR classes at run-time.
-Peter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on...
2005 Dec 20
10
Multiple screens before save called
Is there a clever rails way to chain multiple forms together to collect
all the info that I need before finally calling "save"?
For example consider an app which needs to create a "Order" object which
is tied to a "Contact" object which may or may already exist. Lets
pretend we don''t want to save the order to the DB until the contact info
is known and