ruby on rails - how to maintain model properties -


i new ror, setup enviroment ruby 1.9.2 rails 3.0.6

just notice 1 thing. after create model.. propeties has been add database couldn`t see class.. , work me.

looks rails scan database schema before launching application..

but have question it:

if add or remove columns... how know properties have if not define in class? can manually add properties acticerecord class(es) ??

class user < activerecord::base   has_one :contact   validates_confirmation_of :password end    class createusers < activerecord::migration   def self.up     create_table :users |t|       t.string :username       t.string :password        t.timestamps     end   end    def self.down     drop_table :users   end end 

i;m not sure understand question, can view schema.rb

any migration make update schema


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -