Skip to content

HykuAddons: Routes

Paul Danelli edited this page Feb 18, 2022 · 1 revision

Routes added by this engine are declared in config/routes.rb just like a normal Rails application. Normally an engine's routes are mounted in an application's routes.rb but this engine mounts them automatically during initialization to avoid the need of modifying any file in Hyku other than Gemfile.

If you need to reference a Hyku route using a route helper then you can access it through main_app. If it is a Hyrax route then use hyrax. For example:

  redirect_to main_app.new_user_registration_url
  redirect_to hyrax.dashboard_path