[Rails] Re: a newbie questionadding database field to a model basing only on schema (without model regenerat

2013-08-13 Thread Valentin Kotelnitski
Thank you all for the answers! I only wished to improve I do not have to generate my model again after database schema migration. One person gave mi an advise to read that article http://guides.rubyonrails.org/migrations.html on migrations. The next step is generating scaffold for model,

[Rails] Re: Re: Re: a newbie questionadding database field to a model basing only on schema (without model r

2013-08-13 Thread Valentin Kotelnitski
you are starting a new thread (as I view it in gmail at least) for every reply. I just use ruby-forum interface. -- 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 unsubscribe from this group

[Rails] a newbie questionadding database field to a model basing only on schema (without model regeneration)

2013-08-12 Thread Valentin Kotelnitski
hi! i am trying to add database field to a model without model regeneration. i have added my field to migration scripts class CreateUsers ActiveRecord::Migration def change create_table :users do |t| t.string :name t.string :lg, :default = en t.timestamps end end

[Rails] Re: a newbie questionadding database field to a model basing only on schema (without model regenerat

2013-08-12 Thread Valentin Kotelnitski
thanks for an advise not to change the code in migration tables. i could delete it and add new fields by new migrations scripts but these migration scripts have an influence only on a database schema, not on a table model in app/models catalogue. the only thing i want to do is to add database

[Rails] Re: Re: a newbie questionadding database field to a model basing only on schema (without model regen

2013-08-12 Thread Valentin Kotelnitski
Thank you, Colin! Colin Law wrote in post #1118501: Please remember to quote the previous message and insert your reply inline at appropriate points in the previous message. Remember this is a mailing list not a forum (though you may be accessing it using a forum-like interface). Thanks.

[Rails] Re: a newbie questionadding database field to a model basing only on schema (without model regenerat

2013-08-12 Thread Valentin Kotelnitski
Sorry, it is not a solution. add_column in generated migration scripts adds desired column to database schema. Except that I need a property in my model of a table corresponding to a newly migrated column. That is the question. -- Posted via http://www.ruby-forum.com/. -- You received this