Class: LesliCalendar::CalendarsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/lesli_calendar/calendars_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /calendars



33
34
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 33

def create
end

#destroyObject

DELETE /calendars/1



41
42
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 41

def destroy
end

#editObject

GET /calendars/1/edit



29
30
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 29

def edit
end

#indexObject

GET /calendars



6
7
8
9
10
11
12
13
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 6

def index
    respond_to do |format|
        format.html { }
        format.json do
            respond_with_pagination(LesliCalendar::CalendarService.new(current_user).index(@query))
        end
    end
end

#newObject

GET /calendars/new



25
26
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 25

def new
end

#optionsObject



44
45
46
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 44

def options
    respond_with_successful(Calendar.options(current_user, @query))
end

#showObject

GET /calendars/1



16
17
18
19
20
21
22
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 16

def show
    respond_to do |format|
        format.html { }
        format.json { respond_with_successful(@calendar.show()) }
        #format.json { respond_with_successful(@calendar.show(@query)) }
    end
end

#syncObject



48
49
50
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 48

def sync
    respond_with_successful(Calendar.sync(current_user))
end

#updateObject

PATCH/PUT /calendars/1



37
38
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 37

def update
end