title: Rails route path inside as hash value
body: <p>I'm trying to define constant <code>REDIRECT_DEFINITIONS</code> with application paths as a key. This constant is inside of shared controller:</p>
  <pre><code># frozen_string_literal: true
  
  class SignupBaseController &lt; ApplicationController
    REDIRECT_DEFINITIONS = {
      test_results: {
        new: edit_users_experience_level_path(@current_user),
        create: edit_users_experience_level_path(@current_user),
      },
      experience_levels: {
        edit: new_users_identity_check_path,
      },
      &quot;users/identity_checks&quot;: {
        new: root_path,
      },
      default: request.referrer || root_path,
    }.freeze
  </code></pre>
  <p>But I'm getting an error:</p>
  <pre><code>undefined method `edit_users_experience_level_path' for SignupBaseController:Class
  </code></pre>
  <p>EDIT:</p>
  <p>routes.rb:</p>
  <pre><code>  namespace :users do
      resource :dashboard, only: :show
      resource :identity_check, only: %i[new create show]
      resources :experience_levels, only: %i[edit update]
    end
  </code></pre>