Sha256: b00c0338f9b56be9c14b4b780085a466ae57836f3135d1494d66fcbe86861cd1

Contents?: true

Size: 654 Bytes

Versions: 20

Compression:

Stored size: 654 Bytes

Contents

class Store::StoreController < ActionController::Base
  layout "storefront"
  include CartFinder
  before_filter :store_organization

  def store_organization
    @store_organization ||= load_store_organization
  end

  def load_store_organization
    if params[:organization_slug].present?
      Organization.find_using_slug(params[:organization_slug])
    elsif params[:controller].end_with? "events"
      Event.find(params[:id]).organization
    elsif params[:controller].end_with? "shows"
      Show.where(:uuid => params[:id]).first.organization
    elsif current_member
      current_member.organization
    else
      nil
    end      
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
artfully_ose-1.2.0.pre.21 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.20 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.19 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.18 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.17 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.16 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.15 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.12 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.11 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.10 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.9 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.8 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.7 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.6 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.5 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.4 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.3 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.2 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre.1 app/controllers/store/store_controller.rb
artfully_ose-1.2.0.pre app/controllers/store/store_controller.rb