Sha256: 3de7f79ad7b2c4b09d51c51d712b63f4b7daf809e91aa1f18dc0cc5817b862a2
Contents?: true
Size: 633 Bytes
Versions: 1
Compression:
Stored size: 633 Bytes
Contents
# Module to be included in User if it wants to implement notifications # Sets class options to see if the user has required the module # And defaults notification for every user to true module Kublog module Notifiable def self.included(base) base.class_eval do @@kublog_notifiable = true cattr_accessor :kublog_notifiable end base.send :include, InstanceMethods end # Defaults notification setting to true # If User Kinds are being used, this should be # Overriden module InstanceMethods def notify_post?(post) true end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kublog-0.0.1.1 | lib/kublog/notifiable.rb |