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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:40:41+00:00 2026-05-20T15:40:41+00:00

When creating say a cms application where website specific details will vary depending on

  • 0

When creating say a cms application where website specific details will vary depending on the website, where should I be storing this information?

Things like: site name, support email, smtp settings, etc.?

  • 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-20T15:40:42+00:00Added an answer on May 20, 2026 at 3:40 pm

    Assuming you mean configuration data for the application, here’s what I do:

    I create a config/app_config.yml file with my config information, like this:

    site_name: This awesome site
    support_email: me@mysite.com
    

    Then, at the top of config/application.rb (right below the first ‘require’ statement), I add this:

    # Load application-specific configuration from app_config.yml
    require 'yaml'
    APP_CONFIG = YAML.load(File.read(File.expand_path('../app_config.yml', __FILE__)))
    

    Now, any time I need to access the configuration data, I can get to it via the APP_CONFIG hash, like so:

    html = "For support, please e-mail #{APP_CONFIG['support_email']}"
    

    Note, the above is for Rails 3. For rails 2, instead of loading the config in application.rb, you would put the statements into config/preinitializer.rb.

    See http://asciicasts.com/episodes/226-upgrading-to-rails-3-part-2 for more details.

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

Sidebar

Related Questions

When creating a web application, and lets say you have a User object denoting
I'm a desktop application developer. I'm creating a basic website from which to sell
I'm creating an application to display multiple videos concurrently (lets say 2-10 videos). I'm
Let's say I'm creating a program in C that needs to use a tempfile.
Lets say I have a concrete class Class1 and I am creating an anonymous
Say a client is happy with the work you've done creating a script to
I am creating a custom WPF control that let's say for simplicity sake has
Creating Traversals for Binary Search Tree with Recursion. void inOrder(void (*inOrderPtr)(T&)) { if(this->left !=
I'm creating a CMS as you might already know, and now I have a
I'm using EpiServer CMS 5R2 on a new project. I've been tasked with creating

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.