Class: LesliLetter::NotebookService
- Inherits:
-
Lesli::ApplicationLesliService
- Object
- Lesli::ApplicationLesliService
- LesliLetter::NotebookService
- Defined in:
- app/services/lesli_letter/notebook_service.rb
Instance Method Summary collapse
- #find(id) ⇒ Object
-
#index ⇒ Array
Paginated index of users.
Instance Method Details
#find(id) ⇒ Object
36 37 38 39 |
# File 'app/services/lesli_letter/notebook_service.rb', line 36 def find id self.resource = current_user.account.roles.find_by_id(id) self end |
#index ⇒ Array
Returns Paginated index of users.
44 45 46 47 48 49 50 |
# File 'app/services/lesli_letter/notebook_service.rb', line 44 def index current_user.account.letter.notebooks .select(:id, :name, :description) .page(query[:pagination][:page]) .per(query[:pagination][:perPage]) .order(updated_at: :desc, name: :asc) end |