Class: Stay::Country
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Stay::Country
- Defined in:
- app/models/stay/country.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default(store = nil) ⇒ Object
11 12 13 14 15 16 |
# File 'app/models/stay/country.rb', line 11 def self.default(store = nil) store ||= Stay::Store.default country_id = store.default_country_id default = find_by(id: country_id) if country_id.present? default || find_by(iso: 'US') || first end |
.ransackable_attributes(auth_object = nil) ⇒ Object
7 8 9 |
# File 'app/models/stay/country.rb', line 7 def self.ransackable_attributes(auth_object = nil) ["name"] end |