Fix rubocop warning (#14288)
* Fix rubocop warning * use limit variable * use ContextCreatingMethods option
This commit is contained in:
parent
a8e84a18f1
commit
6a96af4d20
8 changed files with 12 additions and 7 deletions
|
@ -46,6 +46,7 @@ class Auth::SessionsController < Devise::SessionsController
|
|||
user = User.authenticate_with_ldap(user_params) if Devise.ldap_authentication
|
||||
user ||= User.authenticate_with_pam(user_params) if Devise.pam_authentication
|
||||
user ||= User.find_for_authentication(email: user_params[:email])
|
||||
user
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class TagsController < ApplicationController
|
|||
expires_in 0, public: true
|
||||
|
||||
limit = params[:limit].present? ? [params[:limit].to_i, PAGE_SIZE_MAX].min : PAGE_SIZE
|
||||
@statuses = HashtagQueryService.new.call(@tag, filter_params, nil, @local).limit(PAGE_SIZE)
|
||||
@statuses = HashtagQueryService.new.call(@tag, filter_params, nil, @local).limit(limit)
|
||||
@statuses = cache_collection(@statuses, Status)
|
||||
|
||||
render xml: RSS::TagSerializer.render(@tag, @statuses)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue