Class: LesliCalendar::CalendarsController
- Inherits:
-
ApplicationController
- Object
- Lesli::ApplicationLesliController
- ApplicationController
- LesliCalendar::CalendarsController
- Defined in:
- app/controllers/lesli_calendar/calendars_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /calendars.
-
#destroy ⇒ Object
DELETE /calendars/1.
-
#edit ⇒ Object
GET /calendars/1/edit.
-
#index ⇒ Object
GET /calendars.
-
#new ⇒ Object
GET /calendars/new.
- #options ⇒ Object
-
#show ⇒ Object
GET /calendars/1.
- #sync ⇒ Object
-
#update ⇒ Object
PATCH/PUT /calendars/1.
Instance Method Details
#create ⇒ Object
POST /calendars
33 34 |
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 33 def create end |
#destroy ⇒ Object
DELETE /calendars/1
41 42 |
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 41 def destroy end |
#edit ⇒ Object
GET /calendars/1/edit
29 30 |
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 29 def edit end |
#index ⇒ Object
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 |
#new ⇒ Object
GET /calendars/new
25 26 |
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 25 def new end |
#options ⇒ Object
44 45 46 |
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 44 def respond_with_successful(Calendar.(current_user, @query)) end |
#show ⇒ Object
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 |
#sync ⇒ Object
48 49 50 |
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 48 def sync respond_with_successful(Calendar.sync(current_user)) end |
#update ⇒ Object
PATCH/PUT /calendars/1
37 38 |
# File 'app/controllers/lesli_calendar/calendars_controller.rb', line 37 def update end |