RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: kurko
Site: http://twitter.com/kurko
You're defining a class name Portrait as descending from ActiveRecord::Base.
Then you redefining it without ActiveRecord. You can't do that.
Suggestion: wrap your Portrait class (non ActiveRecord) in a module with the name of you app. If you app is called Store, so
module Store class Portrait end end
Also, don't put a module inside the class like this. Module are not meant to be used as classes.
What you can do is set config.rollout in your env file and then use App::Application.config.rollout.
App::Application.config.rollout
For something more elaborated like App::Application.rollout?, you can create your own mixin and have method_missing verifying the actual variable.
App::Application.rollout?
You're defining a class name Portrait as descending from ActiveRecord::Base.
Then you redefining it without ActiveRecord. You can't do that.
Suggestion: wrap your Portrait class (non ActiveRecord) in a module with the name of you app. If you app is called Store, so
Also, don't put a module inside the class like this. Module are not meant to be used as classes.
What you can do is set config.rollout in your env file and then use
App::Application.config.rollout
.For something more elaborated like
App::Application.rollout?
, you can create your own mixin and have method_missing verifying the actual variable.