Hi guys,

I started to integre spree to an existing application.

From the documentation, I know that we can easily carried out logic
customisation.
For example, to override the logic in product.rb, we can create the
product_decorator.rb and put it inside the models folder in my own
application.

But I do not want to these decorator files mixed with my original models.
Can I create a sperate folder inside models, even sub directories to
override logic?
If this case, how to tell spree to find those overridden files.

And creating a extension maybe is a good idea, but overriding is not the
purpose of extension.

Thanks.

--

Search Discussions

  • Ryan Bigg at Jan 17, 2013 at 5:46 am
    You can nest the decorators as much as you wish underneath app/models. So
    yes, you could have app/models/spree and put the decorator in there and it
    would work.

    On Thu, Jan 17, 2013 at 4:34 PM, Miracle wrote:

    Hi guys,

    I started to integre spree to an existing application.

    From the documentation, I know that we can easily carried out logic
    customisation.
    For example, to override the logic in product.rb, we can create the
    product_decorator.rb and put it inside the models folder in my own
    application.

    But I do not want to these decorator files mixed with my original models.
    Can I create a sperate folder inside models, even sub directories to
    override logic?
    If this case, how to tell spree to find those overridden files.

    And creating a extension maybe is a good idea, but overriding is not the
    purpose of extension.

    Thanks.

    --

    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJan 17, '13 at 5:45a
activeJan 17, '13 at 5:46a
posts2
users2
websitespreecommerce.com
irc#RubyOnRails

2 users in discussion

Ryan Bigg: 1 post Miracle: 1 post

People

Translate

site design / logo © 2023 Grokbase