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

  • Home
  • SEARCH
  • 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 6624333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:38:23+00:00 2026-05-25T21:38:23+00:00

In my Rails application the controllers are starting to pile up (> 30). Would

  • 0

In my Rails application the controllers are starting to pile up (> 30).

Would it be Java, I’d started to create sub-packages long ago, but I’m a little hesitant here.
I already have a User and an Admin namespace but I’m not sure if it is good to create a finer namespace structure, especially considering maintainability.

What’s the “Rails way” in this case?

  • Just have a more or less flat controller structure?
  • Or is it better to generously bundle controllers into namespaces/modules?

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-25T21:38:23+00:00Added an answer on May 25, 2026 at 9:38 pm

    Don’t know whether there is an ideal way, but specific to the project I deal, I have grouped it under a folder structure. Initially, again specific to my project, we were having to deal with just a couple of controllers called coach and manager. But as time went by, the size of them started bulging and we had to create few more controllers that could be grouped under a broad category. This was resulting in a flat growth.

    More time went and we started grouping it in folders, example in a folder called coach all the related functionalities for a coach would go and the controller names started looking like class Coach::SchedulesController < ApplicationController.

    This way of grouping would also help in writing the functional tests. You do not want to have your functional test to have insane amount of lines as well.

    But the gist as always Rails suggests is to have a skinny controller and a fat model. At times, it may not be that easy to follow that up and yeah these are some ways you could overcome the difficulties.

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

Sidebar

Related Questions

I'm using a Rails application and would like to send/receive text messages through my
I have a rails application and i keep getting this error /srv/projects/app/controllers/application_controller.rb:174: invalid multibyte
I have a Rails application with several models-views-controllers which have some similar characteristics, for
Ok, so I would like to create an action in Rails to restart itself.
I am working on my first Rails application and want to create an admin
I've been starting to use simple_form in my rails application, which is quite nice.
starting from the rails blog tutorial, i want to have listing and create functionality
I have the following in my Rails 3 controllers/application.rb (which I'm trying to write
I have 2 subdomains that point to one rails application. My rails application's controllers
In my Rails application I'm trying to make the controllers skinnier and am having

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.