Sha256: d8e9bdc517957c542d3e8baa471dd7c93a46847c4fc99424e908597c12926b61
Contents?: true
Size: 520 Bytes
Versions: 65
Compression:
Stored size: 520 Bytes
Contents
class LocalPatron 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
65 entries across 65 versions & 3 rubygems