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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:34:33+00:00 2026-06-18T14:34:33+00:00

I have 5 controllers and 5 views in my own project, I divided my

  • 0

I have 5 controllers and 5 views in my own project, I divided my app in these 5 main areas and I put many actions inside those areas/controllers.

I need many tables/models in my database, example: in the address content I need to separate some tables and build the correct relations to avoid duplicated fields… I want to manage address, user, person, legal entity, events, and many more.

What is the correct way to think in Rails at this point, if i create a model using scaffold:

rails generate scaffold city name:string state_id:integer

I get the correct model, the controller and views automatically.

I want to manage that City table in another controller, one of that five controllers that I created before, I need to manage many tables in just one view, or one controller.

If you know what I need to read and help me, I would appreciate.

  • 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-06-18T14:34:34+00:00Added an answer on June 18, 2026 at 2:34 pm

    model is independent of controller. you can use your any model in any controller. I think it’s one of the reason why MVC architecture is important.

    based on the concept, you can manage your city model, which is generated by scaffold, in any controller. just use ORM in your controller directly:

    City.first
    City.find 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so i have many controllers and many views. i want my variable @random_quote to
I have two view Controllers in my project ViewController , SettingsView . Here I
I have an app with two view controllers. ViewControllerA is a blank view with
I have a Rails application with several models-views-controllers which have some similar characteristics, for
I'm starting an app where I'd like to have multiple view controllers. Some of
I'm working on a project management app, and in the app, I have project_managers
I have loaded the zXing project into my own project. It loads fine, the
While using the Entity Framework I have split it out to it's own project:
I have two view controllers in a tabbar which can both edit data. Therefore,
I have two view controllers that allow changes to the Address Book. The first

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.