Trying to reset Address validations in a decorator but cannot get it to
work. Is it possible. This is my test code:

http://pastie.org/5515667


--
You received this message because you are subscribed to the Google Groups "Spree" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/buX3VJ1v6OoJ.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Search Discussions

  • Nate Lowrie at Dec 12, 2012 at 6:53 pm
    In your engine declaration, you need to put:

    def self.activate Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c| Rails.application.config.cache_classes ? require(c) : load(c) end Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c| Rails.configuration.cache_classes ? require(c) : load(c) end end


    The second glob command will find all of your decorators based on file name and configure rails to use them. If you don't do this, rails won't know to pick them up.


    Regards,


    Nate

    On Wednesday, December 12, 2012 8:05:03 AM UTC-5, Emil Karlsson wrote:

    Trying to reset Address validations in a decorator but cannot get it to
    work. Is it possible. This is my test code:

    http://pastie.org/5515667

    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/cAFMgqewJ44J.
    To post to this group, send email to spree-user@googlegroups.com.
    To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedDec 12, '12 at 1:05p
activeDec 12, '12 at 6:53p
posts2
users2
websitespreecommerce.com
irc#RubyOnRails

2 users in discussion

Emil Karlsson: 1 post Nate Lowrie: 1 post

People

Translate

site design / logo © 2022 Grokbase