Skip to content

Instantly share code, notes, and snippets.

View papricek's full-sized avatar

Patrik Jíra papricek

  • http://www.patrikjira.com
  • Prague
View GitHub Profile
class AnonymousUser < User
attr_accessible *ACCESSIBLE_ATTRS, :type, :token, as: :registrant
def register(params)
params = params.merge(type: 'User', token: nil)
self.update_attributes(params, as: :registrant)
end
end