hobo能够自动处理继承
例:从user继承employee
先建立资源
hobo g model employee birthday:date
直接更改:employee.rb
class Employee < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
timestamps
end
end
为:
class Employee < User
fields do
birthday :Date
end
end
然后:生成数据库
hobo g migration
在Users表中会为你增加一个type字段
还有你继承表中增加的birthday字段
非常方便