Ruby on Rails Monday, July 2, 2012

hello guys

i have a big problem and i don't know how to solve it -.-

i have a data base. the models name is Blafoo

if i go to console i create a new entry with tst = Blafoo.new(:d1 =>
true)

with Blafoo.d1 i can now see the calue of d1

lets take a variable var = "d1"

how can i get it working, that i can interpret var as d1

so tst.(var) ?? gives me the value of tst.d1?

thanks for help..

im awaiting it so much!

basti

--
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@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-US.

No comments:

Post a Comment