set default value while creating model in rails code example Example: set default value for rails attribute .... add_column :status, :string, :default => "P" ....