mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 13:38:24 -04:00
Seeds delegate name and default_photo to their crop
This commit is contained in:
@@ -9,6 +9,8 @@ class Seed < ActiveRecord::Base
|
||||
default_scope { order(created_at: :desc) }
|
||||
|
||||
validates :crop, approved: true
|
||||
delegate :name, to: :crop
|
||||
delegate :default_photo, to: :crop
|
||||
|
||||
validates :crop, presence: { message: "must be present and exist in our database" }
|
||||
validates :quantity,
|
||||
|
||||
Reference in New Issue
Block a user