ruby inheritance. Converting one object into another -


i not know terminology of trying googling has proven hard.

i have 2 ruby classes.

class < activerecord::base  end  class b <  end 

class hits database. there column in class stores intended class name. in example value of column in class 'b'.

my desire find way call a, , b. thought being there more b in future end having c, d, , e. of these classes require unique methods.

rails' single table inheritance can you: http://api.rubyonrails.org/classes/activerecord/base.html#class-activerecord::base-label-single+table+inheritance


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -