Sha256: ce44e7bec7d884b7b5fc8a881ad547e04a2eaa42ff239f15c87d4ce21e449f65
Contents?: true
Size: 519 Bytes
Versions: 49
Compression:
Stored size: 519 Bytes
Contents
class LocalAgent include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming attr_accessor :username, :full_name, :address, :email def initialize(attributes = {}) if attributes[:username] user = User.where(:username => attributes[:username]).first if user send('email=', user.email) end else attributes.each do |name, value| send("#{name}=", value) end end end def persisted? false end def id end end
Version data entries
49 entries across 48 versions & 3 rubygems