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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:00:26+00:00 2026-05-17T22:00:26+00:00

I am new to Ruby on Rails and my questions are about the application

  • 0

I am new to Ruby on Rails and my questions are about the application design, based on Rails 3. There are many data on the internet on the creation of standard websites (such as blogs) on Rails, but my application requires more than just “post and read” and I am not sure how to implement that.

The idea:

  1. The model “Route” includes a number of airlines modules: “Ryanair”, “easyJet”, etc.
  2. The “Route.Update” method calls the “UpdateRoutes” on each airline module (for example, “Ryanair.UpdateRoutes”, “easyJet.UpdateRoutes”)
  3. It should work the same way with more models (such as “Flight.find”) and more airlines (“Delta.FindFlights”)

The questions:

  1. Where should I store all the modules? I don’t see any app/modules folder in Rails.
  2. If my modules require gems, should I include them in the modules or in the models (where they are actually used)?
  3. I want to make my application scalable. For example, I want to add a new working airline (module) without changing any code in “Route”, “Flight” or any other model. I imagine something like the method “IncludeAirlines” which would go through modules/airlines/name.rb, include every module and call the needed method of it (such as name.UpdateRoutes). Is there any better way to implement that in Ruby on Rails?
  • 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-17T22:00:26+00:00Added an answer on May 17, 2026 at 10:00 pm

    As you might know, modules are generally used either as namespaces or as mixins.

    Where you place a module depends on how tightly coupled a module is with the app directory . A few patterns in storing modules :

    1. The /lib directory, if the module does not particularly ‘interact’ or concern the app/ and you treat the module as an internal plug-in.

    2. The app/models directory, would be an appropriate place if your module is central to your business logic. A popular use case here, is where you use a module as a mixin to DRY your models/controllers.

    3. 37 Signals introduced a pattern of treating them as ‘concerns’ and storing them in app/concerns.

    If your module uses a gem, you may need to require the gem in the module (sometimes a require is not at all necessary).

    Your 3rd question is not clear. Sorry about that. Not quite sure what you’re trying to do.

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

Sidebar

Related Questions

I'm new in Ruby on Rails and don't know much about Ruby and Ruby
(Here's my requisite line about being new to ruby/rails and programming in general; first
I'm beginning to work on a new Ruby on Rails application that is a
I'm new to Ruby on Rails and am creating a test application. So far,
I'm new in Ruby/Rails, so, my question: what is the perfect way to upload
I'm new to ruby/rails and trying to build a simple Projects / Tags app
I'm currently evaluating options for adding sub-domain support to a new Ruby on Rails
I'm new to Ruby on Rails, and I'm in the process of setting it
I'm new to Ruby on Rails and I'm trying to model my table relationships.
I'm new to Ruby on Rails (I know Ruby just decently though) and looking

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.