mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-26 01:37:39 -04:00
Compare commits
15 Commits
dev
...
openfarm-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ec6c7cd83 | ||
|
|
f872957782 | ||
|
|
8122a748ee | ||
|
|
b1473c4d8f | ||
|
|
e5303ce1bb | ||
|
|
63f861afb3 | ||
|
|
5c15997d64 | ||
|
|
8011bb1a4c | ||
|
|
5259b449c2 | ||
|
|
c67f561881 | ||
|
|
cb7ec140f4 | ||
|
|
269d66a0bd | ||
|
|
6dc6422805 | ||
|
|
48ec11a96e | ||
|
|
2d62413341 |
@@ -79,7 +79,6 @@ class Ability
|
||||
can :manage, CropCompanion
|
||||
can :manage, ScientificName
|
||||
can :manage, AlternateName
|
||||
can :openfarm, Crop
|
||||
can :gbif, Crop
|
||||
end
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ class Crop < ApplicationRecord
|
||||
has_paper_trail
|
||||
extend FriendlyId
|
||||
include PhotoCapable
|
||||
include OpenFarmData
|
||||
include GbifData
|
||||
include SearchCrops
|
||||
|
||||
|
||||
@@ -126,12 +126,9 @@ class GbifService
|
||||
|
||||
gbif_record = fetch(gbif_usage_key)
|
||||
if gbif_record.present?
|
||||
# crop.update! openfarm_data: gbif_record.fetch('data', false)
|
||||
# save_companions(crop, gbif_record)
|
||||
save_photos(crop, gbif_usage_key)
|
||||
else
|
||||
Rails.logger.debug "\tcrop not found on GBIF"
|
||||
# crop.update!(openfarm_data: false)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ require 'rails_helper'
|
||||
|
||||
describe PhotosHelper do
|
||||
let(:crop) { create(:crop) }
|
||||
let(:crop_photo_of) { create(:photo, source: 'openfarm') }
|
||||
let(:crop_photo_flickr) { create(:photo, source: 'flickr') }
|
||||
|
||||
let(:garden) { create(:garden) }
|
||||
|
||||
Reference in New Issue
Block a user