Sha256: c6035fabe98b6a73608f376ab78b442d164d05f0de95f177a6beaf2b4b32fae4
Contents?: true
Size: 516 Bytes
Versions: 27
Compression:
Stored size: 516 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
27 entries across 27 versions & 1 rubygems