app/models/user_decorator.rb
def mailchimp_merge_vars
    merge_vars = {}
    if mailchimp_merge_user_attribs = Spree::Config.get(:mailchimp_merge_vars)
      mailchimp_merge_user_attribs.split(',').reject(&:blank?).each do |method|
        merge_vars[method.upcase] = self.send(method.downcase) if @user.respond_to? method.downcase
      end
    end
    merge_vars
  end
# Generates the merge variables for subscribing a user
Generates the merge variables for subscribing a user
Generates the merge variables for subscribing a user
def mailchimp_merge_vars
    merge_vars = {}
    if mailchimp_merge_user_attribs = Spree::Config.get(:mailchimp_merge_vars)
      mailchimp_merge_user_attribs.split(',').reject(&:blank?).each do |method|
        merge_vars[method.upcase] = self.send(method.downcase) if @user.respond_to? method.downcase
      end
    end
    merge_vars
  end
def mailchimp_merge_vars merge_vars = { } if mailchimp_merge_user_attribs = Spree :: Config . get ( :mailchimp_merge_vars ) mailchimp_merge_user_attribs . split ( ',' ) . reject ( & :blank? ) . each do | method | merge_vars [ method . upcase ] = self . send ( method . downcase ) if @user . respond_to? method . downcase end end merge_vars end
Generates the merge variables for subscribing a user
Generates the merge variables for subscribing a user