# Creating custom environment specific settings in development.rb available. How do I access them?

**URL:** <https://www.ruby-forum.com/t/creating-custom-environment-specific-settings-in-development-rb-available-how-do-i-access-them/115917>\
**Category:** Rails\
**Created:** [September 30, 2007, 10:12am UTC](https://www.ruby-forum.com/t/creating-custom-environment-specific-settings-in-development-rb-available-how-do-i-access-them/115917 "2007-09-30T10:12:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elemental](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@elemental](https://www.ruby-forum.com/u/elemental)\
**Post date:** [September 30, 2007, 10:12am UTC](https://www.ruby-forum.com/t/creating-custom-environment-specific-settings-in-development-rb-available-how-do-i-access-them/115917/1 "2007-09-30T10:12:20Z")

</div>

Hi all,  
I’m just learning RoR, so if this is obvious, I apologize. I’m  
coming from a J2EE development background, and I can’t seem to find  
the answer I need from Google. I’m using the “acts\_as\_authenticated”  
plugin to create a simple user registration system for my site.  
Everything works fine, but now I want to customize the confirmation  
URL, and the “from” email address on my confirmation email. I’d like  
to provide environment specific settings in my environment files. I’d  
like to add something like the following into development.rb, then  
into my other environments so configuration and deployment is a  
breeze.

```auto
config.user_notifier.from="removed_email_address@domain.invalid"
config.user_notifier.siteurl="http://www.mysite.com"
```

I would then like to access it in the class UserNotifier, which  
extends ActionMailer::Base. I can’t find any examples on this  
anywhere, so any hints would be greatly appreciated. Thanks in  
advance for helping a noob.

Todd

---

<div class="post-metadata">

**Author:** ![elemental](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/6de8d8/32.png) [@elemental](https://www.ruby-forum.com/u/elemental)\
**Post date:** [September 30, 2007, 10:19am UTC](https://www.ruby-forum.com/t/creating-custom-environment-specific-settings-in-development-rb-available-how-do-i-access-them/115917/2 "2007-09-30T10:19:21Z")

</div>

A simple way is to use constants:

CONFIRMATION\_URL = ‘[http://www.bingbangbong.com](http://www.bingbangbong.com)’  
EMAIL\_FROM = ‘removed\_email\_address@domain.invalid’

You can access them from anywhere if they’re defined in an environment  
config file.
