Added plant_part attribute to harvest

This commit is contained in:
Skud
2013-10-29 17:00:32 +11:00
parent 795dc0923f
commit f89c5e5b86
3 changed files with 8 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ class Harvest < ActiveRecord::Base
friendly_id :harvest_slug, use: :slugged
attr_accessible :crop_id, :harvested_at, :description, :owner_id,
:quantity, :unit, :weight_quantity, :weight_unit, :slug
:quantity, :unit, :weight_quantity, :weight_unit, :plant_part, :slug
belongs_to :crop
belongs_to :owner, :class_name => 'Member'

View File

@@ -0,0 +1,5 @@
class AddPlantPartToHarvests < ActiveRecord::Migration
def change
add_column :harvests, :plant_part, :string
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20131025104228) do
ActiveRecord::Schema.define(:version => 20131029053113) do
create_table "account_types", :force => true do |t|
t.string "name", :null => false
@@ -105,6 +105,7 @@ ActiveRecord::Schema.define(:version => 20131025104228) do
t.string "slug"
t.decimal "weight_quantity"
t.string "weight_unit"
t.string "plant_part"
end
create_table "members", :force => true do |t|