P
Phy Prabab
Hello,
I am trying to understand how I can use a return from a method as a constant name for a class. What I am trying to do is take a return I find in a db table and use that name as a class name so that I can use activerecord. I admit my understanding of ActiveRecord is extremely immature so perhaps I am using it wrong.
...
perMatrtix = subMatrix.find[:space].to.upcase
class perMatrix < ActiveRecord::Base; end
blah, blah, blah...
So the return of the find, which is a name (turn to upper) as the name of a class so that I can access that table within the database.
Any help is greatly appreciated! Cheers,
Phy
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I am trying to understand how I can use a return from a method as a constant name for a class. What I am trying to do is take a return I find in a db table and use that name as a class name so that I can use activerecord. I admit my understanding of ActiveRecord is extremely immature so perhaps I am using it wrong.
...
perMatrtix = subMatrix.find[:space].to.upcase
class perMatrix < ActiveRecord::Base; end
blah, blah, blah...
So the return of the find, which is a name (turn to upper) as the name of a class so that I can access that table within the database.
Any help is greatly appreciated! Cheers,
Phy
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com