Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4531348
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T13:53:50+00:00 2026-05-21T13:53:50+00:00

I have a case when clause where based on the URL that you’re at,

  • 0

I have a case when clause where based on the URL that you’re at, it will bring in different menu options. However, depending on some of the menus that you could be at, it doesn’t recognize that you have some variables assigned. The system errors:

ActionController::RoutingError in Pages#users_page

Showing /home/initiald/RubymineProjects/SOWOnline/app/views/layouts/_navigation.html.erb where line #27 raised:

No route matches {:controller=>"results", :action=>"show"}

Here is the code that I have so far

<% case request.path %>
  <% #ROOT AND SETTINGS %>
  <% when '/', settings_path, '/guest' %>
  <% #SURVEY AND RESULTS %>
  <% when '/sow_survey', '/surveys', '/results', result_path, results_path, available_surveys_path, take_survey_path, view_my_survey_path, edit_my_survey_path %>
    <% if permitted_to? [:admin, :partner, :employee], :users  %>
      <%= link_to 'new survey', available_surveys_path %>
      <%= link_to 'edit survey', results_path %>
    <% end %>
  <% #USERS %>
  <% when '/register' , '/users', '/sow_users', edit_user_path %>
      <% if permitted_to? [:admin, :partner, :employee], :users  %>
          <%= link_to 'new user', register_path %>
          <%= link_to 'list users', list_users_path %>
      <% end %>
  <% else %>
<% end %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T13:53:51+00:00Added an answer on May 21, 2026 at 1:53 pm

    There is no any result_path without attributes, but there is result_path(result_id) path, which is:

    {:controller=>"results", :action=>"show", :id => your_paticular_id}
    

    and looks like

    /results/:id
    

    UPD

    Just use regular expression here:

    <% when '/sow_survey', '/surveys', '/results', /\/results\/\d*/, results_path, available_surveys_path, take_survey_path, view_my_survey_path, edit_my_survey_path %>
    

    And yes – your code is messy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a case where I have a variable in my JavaScript that will
I have a hash that will render my html differently based on a particular
I have a case that keeps coming up where I'm using a ListView or
I have a question about case statements and nulls in a where clause. I
I'm working on a web-based business application where each customer will need to have
I have a table that is to be sorted based on two columns of
I have a Drupal website that has a page at the URL alias of
I'm seeing two different behaviors based on the CLR that my application is being
I have a case where a 3rd party ad is bleeding through my modal
I have a case where if a SharePoint site owner decides to break permissions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.