Skip to content

Instantly share code, notes, and snippets.

@JoshvaR88
Forked from mumoc/gist:55dce225244fb02363e2
Last active August 29, 2015 14:20
Show Gist options
  • Save JoshvaR88/29752711465df4290b73 to your computer and use it in GitHub Desktop.
Save JoshvaR88/29752711465df4290b73 to your computer and use it in GitHub Desktop.
# ***config/application.rb***
module SpreeDemo
class Application < Rails::Application
# more awesome code here...
config.to_prepare do |config|
# more code here...
config.autoload_paths += %W(#{config.root}/lib/spree/)
#...
end
end
end
# ***lib/spree/bucket_configuration.rb***
module Spree
class BucketConfiguration < Spree::Preferences::Configuration
preference :bucket_name, :string, default: "waka"
preference :bucket_url, :string, default: ""
end
end
# ***config/initializers/bucket_configuration.rb***
module Spree
SpreeDemo::Config = Spree::BucketConfiguration.new
end
SpreeDemo::Config[:bucket_name] = "blue_theme"
SpreeDemo::Config[:bucket_url] = "waka" + SpreeDemo::Config.bucket_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment