Add pagination to alerts index
This commit is contained in:
@@ -3,7 +3,7 @@ module Api::V1::Parks
|
||||
before_action :set_park
|
||||
|
||||
def index
|
||||
render json: @park.alerts
|
||||
render json: @park.alerts.limit(per_page).offset((page - 1) * per_page)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user