Hi all,
I would like to store a method call in a database, yet once saved I
don''t know how to convert it from a string back to a method call.
example:
distance_of_time_in_words(order.created_at, order.created_at +
order.due_date)
The value of order.due_date "10.weeks", but could be
"20.days",
"100.months", etc.
Just wondering if there''s a way to convert a
string "10.weeks"
to a method
10.weeks
?
Thanks for your help!
Dave
--
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@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---