Module: Hyrax::Controller

Extended by:
ActiveSupport::Concern
Defined in:
app/controllers/concerns/hyrax/controller.rb

Instance Method Summary collapse

Instance Method Details

#create_work_presenterObject

Deprecated.

this helper is no longer used by Hyrax; if you need access to this presenter on every page, you may need to readd it manually.

A presenter for selecting a work type to create this is needed here because the selector is in the header on every page.



24
25
26
27
28
29
30
# File 'app/controllers/concerns/hyrax/controller.rb', line 24

def create_work_presenter
  Deprecation.warn(self, "The `create_work_presenter` helper is deprecated " \
                         "for removal in Hyrax 3.0. The work selector has " \
                         "been removed the masthead in Hyrax 2.1.")

  Hyrax::SelectTypeListPresenter.new(current_user)
end

#default_url_optionsObject

Ensure that the locale choice is persistent across requests



33
34
35
# File 'app/controllers/concerns/hyrax/controller.rb', line 33

def default_url_options
  super.merge(locale: I18n.locale)
end

#user_root_pathObject

Provide a place for Devise to send the user to after signing in



14
15
16
# File 'app/controllers/concerns/hyrax/controller.rb', line 14

def user_root_path
  hyrax.dashboard_path
end