mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-07 05:25:23 -04:00
need to test sunniness/planted_from.blank?
This commit is contained in:
1 parent
c4f4f4f7ef
commit
ece34149a2
1 file changed
+2
-2
+2
-2
@@ -46,7 +46,7 @@ class Crop < ActiveRecord::Base
|
||||
def sunniness
|
||||
sunniness = Hash.new(0)
|
||||
plantings.each do |p|
|
||||
if p.sunniness
|
||||
if !p.sunniness.blank?
|
||||
sunniness[p.sunniness] += 1
|
||||
end
|
||||
end
|
||||
@@ -56,7 +56,7 @@ class Crop < ActiveRecord::Base
|
||||
def planted_from
|
||||
planted_from = Hash.new(0)
|
||||
plantings.each do |p|
|
||||
if p.planted_from
|
||||
if !p.planted_from.blank?
|
||||
planted_from[p.planted_from] += 1
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user