engines/adva_cms/vendor/plugins/globalize2/lib/globalize/backend/chain.rb
# Change this to a) accept any number of backends and b) accept classes.
# When classes are passed instantiate them and add the instances as backends.
# Return the added backends from #add.
#
# Add an initialize method that accepts the same arguments and passes them
# to #add, so we could:
#   I18n.backend = Globalize::Backend::Chain.new(Globalize::Backend::Foo, Globalize::Backend::Bar)
#   Globalize::Backend::Chain.new(:foo, :bar)
#   Globalize.chain_backends :foo, :bar
Change this to a) accept any number of backends and b) accept classes.
When classes are passed instantiate them and add the instances as backends.
Return the added backends from #add.


Change this to a ) accept any number of backends and b ) accept classes . When classes are passed instantiate them and add the instances as backends . Return the added backends from #add .
def add(*backends)
        backends.each do |backend|
          backend = Globalize::Backend.const_get(backend.to_s.capitalize) if backend.is_a? Symbol
          backend = backend.new if backend.is_a? Class
          self.backends << backend
        end
      end
def add ( * backends ) backends . each do | backend | backend = Globalize :: Backend . const_get ( backend . to_s . capitalize ) if backend . is_a? Symbol backend = backend . new if backend . is_a? Class self . backends << backend end end
Change this to a) accept any number of backends and b) accept classes.
Change this to a ) accept any number of backends and b ) accept classes .
backends