lib/cantango/masquerade_ext/macros/account.rb in cantango-masquerade-0.1.2 vs lib/cantango/masquerade_ext/macros/account.rb in cantango-masquerade-0.1.2.1
- old
+ new
@@ -1,9 +1,10 @@
module CanTango::Macros
module Account
def tango_account options = {}
self.send :include, CanTango::Api::Model::Account
- options = CanTango::Macros.extract(options) if options.kind_of? Array
+ options = [options] if options.kind_of?(Symbol)
+ options = CanTango::Macros.extract(options) if options.kind_of?(Array)
if defined? CanTango::Macros::Masquerader::Account
self.send :include, CanTango::Macros::Masquerader::Account
masquerader if options[:masquerade]
end