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
27 28 29 |
# File 'app/models/spree_cm_commissioner/tenant.rb', line 27 def active_vendor vendors.where(state: :active).first end |
#formatted_url ⇒ Object
35 36 37 38 39 |
# File 'app/models/spree_cm_commissioner/tenant.rb', line 35 def formatted_url return if host.blank? Rails.env.development? || Rails.env.test? ? "http://#{host}" : "https://#{host}" end |
#url ⇒ Object
31 32 33 |
# File 'app/models/spree_cm_commissioner/tenant.rb', line 31 def url host end |