summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3650c5f)
This is probably a better decision than just using a string. I can break it
into address pieces later, but that can wait.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
<%= text_field 'customer', 'name' %></p>
<p><label for="customer_address">Address</label><br/>
<%= text_field 'customer', 'name' %></p>
<p><label for="customer_address">Address</label><br/>
-<%= text_field 'customer', 'address' %></p>
+<%= text_area 'customer', 'address' %></p>
<p><label for="customer_email">Email</label><br/>
<%= text_field 'customer', 'email' %></p>
<p><label for="customer_email">Email</label><br/>
<%= text_field 'customer', 'email' %></p>
--- /dev/null
+class CustomersTextAddress < ActiveRecord::Migration
+ def self.up
+ change_column :customers, :address, :text
+ end
+
+ def self.down
+ change_column :customers, :address, :string
+ end
+end
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
-ActiveRecord::Schema.define(:version => 9) do
+ActiveRecord::Schema.define(:version => 10) do
create_table "coitems", :force => true do |t|
t.column "customer_id", :integer
create_table "coitems", :force => true do |t|
t.column "customer_id", :integer
create_table "customers", :force => true do |t|
t.column "name", :string
create_table "customers", :force => true do |t|
t.column "name", :string
- t.column "address", :string
+ t.column "address", :text, :limit => 255
t.column "email", :string
t.column "phone", :string
t.column "email", :string
t.column "phone", :string
- t.column "debt", :decimal, :precision => 8, :scale => 2, :default => 0.0
+ t.column "debt", :decimal, :default => 0.0
end
create_table "rentables", :force => true do |t|
end
create_table "rentables", :force => true do |t|