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.
25 26 27 28 29 30 |
# File 'lib/spree/initializer.rb', line 25 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.
21 22 23 |
# File 'lib/spree/initializer.rb', line 21 def extension_paths @extension_paths end |
#extensions ⇒ Object
Returns the value of attribute extensions.
22 23 24 |
# File 'lib/spree/initializer.rb', line 22 def extensions @extensions end |
#view_paths ⇒ Object
Returns the value of attribute view_paths.
23 24 25 |
# File 'lib/spree/initializer.rb', line 23 def view_paths @view_paths end |
Instance Method Details
#default_extension_paths ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/spree/initializer.rb', line 32 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 |