Class: LesliCalendar::CalendarService
- Inherits:
-
Lesli::ApplicationLesliService
- Object
- Lesli::ApplicationLesliService
- LesliCalendar::CalendarService
- Defined in:
- app/services/lesli_calendar/calendar_service.rb
Instance Method Summary collapse
Instance Method Details
#find(calendar_id) ⇒ Object
36 37 38 39 |
# File 'app/services/lesli_calendar/calendar_service.rb', line 36 def find calendar_id #super(current_user.account.calendar.calendar.find_by(id: calendar_id)) super(current_user.account.calendar.calendars.first) end |
#find_default ⇒ Object
41 42 43 |
# File 'app/services/lesli_calendar/calendar_service.rb', line 41 def find_default find(current_user.account.calendar.calendars.find_by(:name => "default")) end |
#show ⇒ Object
45 46 47 48 49 50 51 52 53 54 |
# File 'app/services/lesli_calendar/calendar_service.rb', line 45 def show() # Calendar data calendar_data = { id: self.resource.id, name: self.resource.name, user_id: self.resource.user_id, events: [], events_support: LesliSupport::TicketService.new(current_user).with_deadline } end |