Module: Voltron::Notify
- Defined in:
- lib/voltron/notify.rb,
lib/voltron/notify/engine.rb,
lib/voltron/notify/version.rb,
lib/voltron/notify/action_dispatch/routes.rb,
lib/generators/voltron/notify/install_generator.rb
Defined Under Namespace
Modules: Generators, InstanceMethods, Routes Classes: Engine
Constant Summary collapse
- LOG_COLOR =
:light_yellow- VERSION =
'0.2.0'.freeze
Instance Method Summary collapse
Instance Method Details
#notifyable(defaults = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/voltron/notify.rb', line 11 def notifyable(defaults={}) include InstanceMethods @_notification_defaults = defaults.with_indifferent_access before_validation :validate_notifications after_validation :clean_notification_validation has_many :notifications, as: :notifyable, class_name: '::Voltron::Notification' end |