diff options
| author | mo khan <mo@mokhan.ca> | 2016-05-28 08:38:43 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2016-05-28 08:38:43 -0600 |
| commit | 8be0dbbbafecb2065b2dbbb161dd6f31fe51ceb8 (patch) | |
| tree | 3911765c72e06fe7401735f009985a8888e293d7 /app/models | |
| parent | cd79878b91a6b2bffde89cf34774b62a0e4dbc62 (diff) | |
update gyms#create to create a gym using the yelp id.
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/gym.rb | 2 | ||||
| -rw-r--r-- | app/models/profile.rb | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/app/models/gym.rb b/app/models/gym.rb index e0e998c..f484e23 100644 --- a/app/models/gym.rb +++ b/app/models/gym.rb @@ -65,7 +65,7 @@ class Gym < ActiveRecord::Base end def self.create_from_yelp!(id) - Gym.find_by(yelp_id: id) || Gym.map_from(::Yelp.client.business(id).business).save! + Gym.find_by(yelp_id: id) || Gym.map_from(::Yelp.client.business(id).business) end def self.import(city, pages: 5) diff --git a/app/models/profile.rb b/app/models/profile.rb index ed4681d..ccab7c4 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -3,7 +3,6 @@ class Profile < ActiveRecord::Base belongs_to :gym enum social_tolerance: { low: 0, medium: 1, high: 2 } enum gender: { female: 0, male: 1, transgender: 2, other: nil } - attr_accessor :home_gym def to_param user.username |
