mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 09:43:24 -04:00
Merge pull request #349 from maco/dev
Add 'root/tuber' to 'planted from:' list, for things like potatoes
This commit is contained in:
@@ -43,7 +43,8 @@ class Planting < ActiveRecord::Base
|
||||
'bare root plant',
|
||||
'advanced plant',
|
||||
'graft',
|
||||
'layering'
|
||||
'layering',
|
||||
'root/tuber'
|
||||
]
|
||||
validates :planted_from, :inclusion => { :in => PLANTED_FROM_VALUES,
|
||||
:message => "%{value} is not a valid planting method" },
|
||||
|
||||
@@ -110,7 +110,7 @@ describe Planting do
|
||||
it 'all valid planted_from values should work' do
|
||||
['seed', 'seedling', 'cutting', 'root division',
|
||||
'runner', 'bare root plant', 'advanced plant',
|
||||
'graft', 'layering', 'bulb', nil, ''].each do |p|
|
||||
'graft', 'layering', 'bulb', 'root/tuber', nil, ''].each do |p|
|
||||
@planting = FactoryGirl.build(:planting, :planted_from => p)
|
||||
@planting.should be_valid
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user