Sha256: 480ed6078d56d6dc807a54a62c791603956c7ea4d2d4faeb21a136b21979b08e
Contents?: true
Size: 874 Bytes
Versions: 36
Compression:
Stored size: 874 Bytes
Contents
module Spider; module Master class Customer < Spider::Model::Managed element :name, String element :uuid, UUID element :public_key, Text element :private_key, Text multiple_choice :admins, Master::Admin, :add_multiple_reverse => {:name => :customers, :association => :multiple_choice} do element :receive_notifications, Bool, :default => true element :manage_plugins, Bool, :default => true end with_mapper do def before_save(obj, mode) if mode == :insert global = Admin.where(:global => true) global.each do |adm| obj.admins << adm end end super end end end end; end
Version data entries
36 entries across 36 versions & 1 rubygems