Created
March 13, 2012 21:39
-
-
Save dx7/2031859 to your computer and use it in GitHub Desktop.
You CAN inherit from a Rails::Application child!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Settings < YourAppName::Application | |
| end | |
| # The Problem: | |
| # ==> .../.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:12:in `inherited': | |
| # You cannot inherit from a Rails::Application child (RuntimeError) | |
| # Because: | |
| # http://apidock.com/rails/Rails/Application/Configurable/ClassMethods/inherited | |
| # Resolving: | |
| class << YourAppName::Application | |
| def inherited(base) | |
| end | |
| end | |
| class Settings < YourAppName::Application | |
| # your code here... | |
| end | |
| # :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment