Reputation: 8330
I'm writing my first Rails app. The app uses a lot of enumerations, so I'd like to include this gem that makes it easier to work with them.
I'm stumped by the installation instructions, though, which say
[...] For a rails application configure the gem in the config block of the
config/environment.rb
fileconfig.gem "enumerated_attribute"
In my config/environment.rb
I don't see anything that looks like a "config block".
config/environment.rb
:
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Webtet::Application.initialize!
So what does the author mean when he writes "configure the gem in the config block"?
Does he just want me to include this line in config/environment.rb
config.gem "enumerated_attribute"
?
Upvotes: 1
Views: 230
Reputation: 24617
Looks like this setup instruction was written for rails 2 application. If this gem works with rails 3 you just should add gem 'enumerated_attribute'
to your Gemfile. Also you can try to use https://github.com/brainspec/enumerize gem (it works with rails 3 and has SimpleForm, Formtastic support and other awesome features)
Upvotes: 2