Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
Merge branch 'sunny4381-shirasagi-478'
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny4381 committed May 29, 2015
2 parents 255e0ae + a4ac75d commit 7850f39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions app/models/ss/config.rb
@@ -1,9 +1,4 @@
module SS::Config
# Use SS.config
def SS.config
SS::Config
end

class << self
def method_missing(name, *args, &block)
file = "#{Rails.root}/config/#{name}.yml"
Expand Down
1 change: 0 additions & 1 deletion app/models/ss/initializer.rb
@@ -1,6 +1,5 @@
module SS
class Initializer
SS::Config
ActionView::Base.default_form_builder = SS::Helpers::FormBuilder
ApplicationMailer.set :load_settings
end
Expand Down
5 changes: 5 additions & 0 deletions config/application.rb
Expand Up @@ -30,6 +30,11 @@ class Application < Rails::Application
config.paths["config/routes.rb"] << file
end
end

def self.config
# lazy loading
@_ss_config ||= "SS::Config".constantize
end
end

def dump(*args)
Expand Down

0 comments on commit 7850f39

Please sign in to comment.