Class: SpreeCmCommissioner::Tenant
- Extended by:
- FriendlyId
- Includes:
- JsonPreferenceValidator, TenantPreference
- Defined in:
- app/models/spree_cm_commissioner/tenant.rb
Instance Method Summary collapse
Instance Method Details
#active_vendor ⇒ Object
24 25 26 |
# File 'app/models/spree_cm_commissioner/tenant.rb', line 24 def active_vendor vendors.where(state: :active).first end |
#formatted_url ⇒ Object
32 33 34 35 36 |
# File 'app/models/spree_cm_commissioner/tenant.rb', line 32 def formatted_url return if host.blank? Rails.env.development? || Rails.env.test? ? "http://#{host}" : "https://#{host}" end |
#url ⇒ Object
28 29 30 |
# File 'app/models/spree_cm_commissioner/tenant.rb', line 28 def url host end |