Skip to content

Instantly share code, notes, and snippets.

@dx7
Created March 13, 2012 21:39
Show Gist options
  • Select an option

  • Save dx7/2031859 to your computer and use it in GitHub Desktop.

Select an option

Save dx7/2031859 to your computer and use it in GitHub Desktop.
You CAN inherit from a Rails::Application child!
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