Skip to content

Commit

Permalink
Merge pull request #138 from ChicagoWorldcon/room-fix
Browse files Browse the repository at this point in the history
rooms and room sets not paginated
  • Loading branch information
balen authored May 26, 2022
2 parents 74f52e2 + 9574187 commit 62f5939
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 62f5939

Please sign in to comment.