Sha256: 86e6f28d5c093e7c4a9331df5f10ee240487157ee2ea60d535ce61c191ace2e9

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

module OpenConferenceWare
  class EventsController < ApplicationController
    include BreadcrumbsMixin
    add_breadcrumb "Events", "/events"

    before_filter :assert_current_event_or_redirect
    before_filter :normalize_event_path_or_redirect
    before_filter :assert_proposal_status_published, only: :speakers
    before_filter :require_admin, only: [:selector_votes]

    def index
      @events = Event.order("deadline asc")

      respond_to do |format|
        format.html
        format.json { render json: @events }
        format.xml  { render xml:  @events }
      end
    end

    def show
      respond_to do |format|
        format.html { redirect_to event_proposals_path(@event) }
        format.json { render json: @event }
        format.xml  { render xml:  @event }
      end
    end

    def speakers
      assign_prefetched_hashes

      respond_to do |format|
        format.html
        format.json { render json: @speakers }
        format.xml  { render xml:  @speakers }
        format.csv  { render csv:  @speakers, style: admin? ? :full : :public }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
open_conference_ware-1.0.0.pre4 app/controllers/open_conference_ware/events_controller.rb