Sha256: 2eb7c86309c37914e971499cd870f3944822d0afeaef31cfee0811bf3330b6d4

Contents?: true

Size: 604 Bytes

Versions: 4

Compression:

Stored size: 604 Bytes

Contents

module Droom
  class CalendarsController < Droom::EngineController
    respond_to :html, :json, :rss, :ics
    layout :no_layout_if_pjax

    before_filter :authenticate_user!
    before_filter :get_calendar, :only => :show
    before_filter :get_calendars, :only => :index
    before_filter :require_admin!, :except => :show

    def show
      respond_with @calendar
    end

    def index
      respond_with @calendars
    end

  protected

    def get_calendars
      @calendars = Droom::Calendar.all
    end

    def get_calendar
      @calendar = Droom::Calendar.find(params[:id])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
droom-0.4.3 app/controllers/droom/calendars_controller.rb
droom-0.4.2 app/controllers/droom/calendars_controller.rb
droom-0.4.1 app/controllers/droom/calendars_controller.rb
droom-0.2.1 app/controllers/droom/calendars_controller.rb