Skip to content

Commit

Permalink
rooms and room sets not paginated
Browse files Browse the repository at this point in the history
allow paging of not paginated if wanted by client
  • Loading branch information
Henry committed May 26, 2022
1 parent 74f52e2 commit 9574187
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/concerns/resource_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def paginated
format = params[:format]
return false if format == 'xls' || format == 'xlsx'

paginate
params[:perPage]&.to_i || paginate
end

def derived_col?(col_name:)
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/room_sets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ class RoomSetsController < ResourceController
SERIALIZER_CLASS = 'RoomSetSerializer'.freeze
POLICY_CLASS = 'RoomSetsPolicy'.freeze
POLICY_SCOPE_CLASS = 'RoomSetsPolicy::Scope'.freeze

def paginate
false
end
end
4 changes: 4 additions & 0 deletions app/controllers/rooms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ class RoomsController < ResourceController
POLICY_CLASS = 'RoomPolicy'.freeze
POLICY_SCOPE_CLASS = 'RoomPolicy::Scope'.freeze
DEFAULT_SORTBY = 'rooms.sort_order'

def paginate
false
end
end

0 comments on commit 9574187

Please sign in to comment.