Module: CanTango::Macros::User

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

Instance Method Summary collapse

Instance Method Details

#tango_user(options = {}) ⇒ Object



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

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

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