Simplify instance presenter view access (#26046)
This commit is contained in:
parent
2016c5d912
commit
340f1a68be
11 changed files with 5 additions and 58 deletions
|
@ -9,17 +9,11 @@ module AccountControllerConcern
|
|||
FOLLOW_PER_PAGE = 12
|
||||
|
||||
included do
|
||||
before_action :set_instance_presenter
|
||||
|
||||
after_action :set_link_headers, if: -> { request.format.nil? || request.format == :html }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_instance_presenter
|
||||
@instance_presenter = InstancePresenter.new
|
||||
end
|
||||
|
||||
def set_link_headers
|
||||
response.headers['Link'] = LinkHeader.new(
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue