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 7508895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:45:49+00:00 2026-05-29T22:45:49+00:00

I am having problem with namespaced controller and routing. I have following namespaced route.

  • 0

I am having problem with namespaced controller and routing. I have following namespaced route.

  namespace :institution do
    resources :students
  end

along with

  resources :students, :only => [] do
    resources :college_selections, :only =>[:index, :create, :update]
    resources :progress, :only => [:index] do
      collection {get 'compare'}
    end
    resources :marks
  end

it generated the following routes

       institution_students GET    /institution/students(.:format)                 {:action=>"index", :controller=>"institution/students"}
                            POST   /institution/students(.:format)                 {:action=>"create", :controller=>"institution/students"}
    new_institution_student GET    /institution/students/new(.:format)             {:action=>"new", :controller=>"institution/students"}
   edit_institution_student GET    /institution/students/:id/edit(.:format)        {:action=>"edit", :controller=>"institution/students"}
        institution_student GET    /institution/students/:id(.:format)             {:action=>"show", :controller=>"institution/students"}
                            PUT    /institution/students/:id(.:format)             {:action=>"update", :controller=>"institution/students"}
                            DELETE /institution/students/:id(.:format)             {:action=>"destroy", :controller=>"institution/students"}

I have a students controller inside institution directory in apps directory. And it has following structure.

class Institution::StudentsController < ApplicationController
  before_filter :require_login
  load_and_authorize_resource
..........
.........
end

Now when i tried to redirect to students show page with a link_to helper method as shown below

<%= link_to "show", institution_student_path(student) %> 

then it showed wired kind of link with a period(.) in it. Say the student id is 100 and it generated the routes like this

institution/students/4.100 

here 4 is current institution id i guess. Why is such routes being generated.

And when i click on show link it gave me error saying

Expected /home/gagan/projects/App_name/app/Institution/students_controller.rb to define StudentsController

What am i missing here.

Thanks in advance.

  • 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-29T22:45:51+00:00Added an answer on May 29, 2026 at 10:45 pm

    Never mind I got the answer. Actually I was putting institution folder outside controller folder which was the reason that the controller inside this folder are not being recognized. Hence solved the problem.

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

Sidebar

Related Questions

i am having a problem in adding the image files to project namespace. I'm
I'm having problem when running my Windows Forms program. In the program, I have
I'm having a problem with forward declarations in a nested namespace. I put a
I'm having a problem since I wrapped my javascript functions inside of a namespace.
I'm not sure why I'm having this problem, but I can only talk to
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
I'm having problem with Rails plugin attachment_fu . On every upload, I get validation
i'm having problem to deal with charset in ruby on rails app, specificially in
I am having problem in getting reference of Ajax control extender using $find() or
I'm having problem selecting an element with an id like this <li =0f:Bactidol_Recorder.mp4>. I

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.