Sha256: e759b9941aa909b24f06f58295790ecf581635b9ce0b9947581534155cd7e172

Contents?: true

Size: 749 Bytes

Versions: 17

Compression:

Stored size: 749 Bytes

Contents

class Store::EventsController < Store::StoreController
  def show
    session[:last_event_id] = params[:id]
    
    @event = Event.storefront_find(params[:id], current_member)
    @shows = @event.upcoming_shows_rel.published

    if @shows.count < 5
      @shows = @shows.includes(:event, :chart => [:sections => :ticket_types])
    elsif 
      dates = @shows.collect(&:datetime_local_to_event).map {|d| d.to_date}
      @dates_by_month = dates.group_by {|d| d.strftime("%B %Y")}
    end

    render :single_show and return if @event.single_show?
    render :calendar    and return if @event.upcoming_public_shows.length > 4
    render :show
  end

  def index
    @events = Event.for_event_storefront(store_organization, current_member)
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
artfully_ose-1.3.0.pre3 app/controllers/store/events_controller.rb
artfully_ose-1.3.0.pre2 app/controllers/store/events_controller.rb
artfully_ose-1.3.0.pre1 app/controllers/store/events_controller.rb
artfully_ose-1.2.0 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.beta.1 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.alpha.2 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.alpha.1 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.27 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.26 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.24 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.23 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.21 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.20 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.19 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.18 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.17 app/controllers/store/events_controller.rb
artfully_ose-1.2.0.pre.16 app/controllers/store/events_controller.rb