Module: CanTango::Macros::Account

Defined in:
lib/cantango/masquerade_ext/macros/account.rb

Instance Method Summary collapse

Instance Method Details

#tango_account(options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/cantango/masquerade_ext/macros/account.rb', line 3

def  options = {}
  self.send :include, CanTango::Api::Model::Account
  options = CanTango::Macros.extract(options) if options.any_kind_of?(Array, Symbol)

  if defined? CanTango::Macros::Masquerader::Account
    self.extend CanTango::Macros::Masquerader::Account
    masquerader if options[:masquerade]
  end
end