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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:07:45+00:00 2026-05-30T13:07:45+00:00

Just learning rails, developing first app and having trouble finding a straight answer to

  • 0

Just learning rails, developing first app and having trouble finding a straight answer to this question!

I want to keep my models as lean as possible and really only want to use them to represent objects that I might want to render in my views. Therefore, I want to remove some of the logic from one particular model and store it in a separate file. I have seen numerous guides (on this site and others) that suggest the following;

  • never “require” anything from inside a rails app
  • Store additional files in the lib folder – they used to be auto loaded in older rails releases but now you need to add an extra line in a config file to get this to happen (Example.

So I added the line, stuck the file in the lib folder, and it all worked fine. So on to the question;

I can’t shake the feeling that the fact that I had to go and put some bespoke code into the config file means I’m doing this wrong (given convention over configuration). Why are people having to faff around editing configuration files to get rails to do something so basic?

Is that the best way or are there additional considerations that I’m just not seeing? Should I in fact be creating an “extras” directory rather than still sticking things in lib?

If anyone can point me in the direction of a definitive article on the matter I’d be much obliged!

  • 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-30T13:07:46+00:00Added an answer on May 30, 2026 at 1:07 pm

    There is nothing wrong with having non active record models in the model folder. If your domain is best modeled by a business logic layer and a persistence layer, then model it that way in your model folder with appropriate naming conventions. Personally I wouldn’t be overly concerned with getting it perfect. Try something and see how you like it.. learn from your mistakes and keep getting better! Above all, enjoy the process.

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

Sidebar

Related Questions

I am just getting started learning rails. I am building my first app using
I'm just learning MongoDB and MongoMapper. This is on Rails 3. I created a
Hey, I'm just learning ruby on rails and I've been stumped on this for
I've just started learning Ruby on Rails and it's a newbie question. I did
Surely this is a newb question as I am just learning RoR and can't
I'm just learning Ruby on Rails. I've read a few books, I've watched lots
I'm just learning ruby on rails and I have a table of user roles
I'm just learning how to program in Ruby on Rails, and I'm really impressed
I am just learning about app.config in respect of creating custom sections. I have
I am just learning Rails. I had encountered a routing error, though I think

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.