Class: Spree::Configuration
- Defined in:
- lib/spree/initializer.rb
Instance Attribute Summary collapse
-
#extension_paths ⇒ Object
Returns the value of attribute extension_paths.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#view_paths ⇒ Object
Returns the value of attribute view_paths.
Instance Method Summary collapse
- #default_extension_paths ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 |
# File 'lib/spree/initializer.rb', line 16 def initialize self.view_paths = [] self.extension_paths = default_extension_paths self.extensions = [ :all ] super end |
Instance Attribute Details
#extension_paths ⇒ Object
Returns the value of attribute extension_paths.
12 13 14 |
# File 'lib/spree/initializer.rb', line 12 def extension_paths @extension_paths end |
#extensions ⇒ Object
Returns the value of attribute extensions.
13 14 15 |
# File 'lib/spree/initializer.rb', line 13 def extensions @extensions end |
#view_paths ⇒ Object
Returns the value of attribute view_paths.
14 15 16 |
# File 'lib/spree/initializer.rb', line 14 def view_paths @view_paths end |
Instance Method Details
#default_extension_paths ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/spree/initializer.rb', line 23 def default_extension_paths env = ENV["RAILS_ENV"] || RAILS_ENV paths = [SPREE_ROOT + '/vendor/extensions', RAILS_ROOT + '/vendor/extensions'].uniq # There's no other way it will work, config/environments/test.rb loads too late # TODO: Should figure out how to include this extension path only for the tests that need it paths.unshift(SPREE_ROOT + "/test/fixtures/extensions") if env == "test" paths end |