Sha256: d3fd66aec475e2052a9aa2bba336b341b4485fd23a4d8026ef8d289bb9dc2464
Contents?: true
Size: 677 Bytes
Versions: 3
Compression:
Stored size: 677 Bytes
Contents
class Setting < ActiveRecord::Base belongs_to :organization has_many :notifications, :as => :source # check user update settings def self.check_user(user) already_exist = UserNotificationSetting.where("user_id=?",user) if !already_exist.blank? user_exitence = "exist" else user_exitence = "not_exist" end return user_exitence end #Notification setting alert def self.notification_alert(user, organization) @notification = Notification.create( :summary => "Notification setting has been changed", :notification_type => "NSC", :notified_by => user, ) @notification.add_notifiers([user]) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pshq_engine-0.1.6 | app/models/setting.rb |
pshq_engine-0.1.5 | app/models/setting.rb |
pshq_engine-0.0.1 | app/models/setting.rb |