2011-05-27 22:14:45 +00:00
|
|
|
module Locomotive
|
|
|
|
module Hosting
|
|
|
|
module Bushido
|
|
|
|
|
|
|
|
module AccountExt
|
|
|
|
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
|
2011-11-16 19:32:00 +00:00
|
|
|
field :bushido_user_id, :type => String
|
2011-05-27 22:14:45 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2011-07-26 19:20:03 +00:00
|
|
|
module InstanceMethods
|
|
|
|
|
|
|
|
def cas_extra_attributes=(extra_attributes)
|
|
|
|
return if extra_attributes.blank?
|
|
|
|
|
|
|
|
self.update_attributes({
|
|
|
|
:email => extra_attributes['email'],
|
|
|
|
:name => "#{extra_attributes['first_name']} #{extra_attributes['last_name']}",
|
|
|
|
:locale => extra_attributes['locale'],
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2011-05-27 22:14:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
2011-11-16 19:32:00 +00:00
|
|
|
end
|