Module: MultiNotifier::Adapter::ActiveModel::Model
- Included in:
- MultiNotifier::Adapter
- Defined in:
- lib/multi_notifier/model.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/multi_notifier/model.rb', line 6 def self.included(base) base.class_eval do extend ::ActiveModel::Naming extend ::ActiveModel::Translation include ::ActiveModel::Validations include ::ActiveModel::Conversion end end |
Instance Method Details
#initialize(params = {}) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/multi_notifier/model.rb', line 15 def initialize(params={}) params.each do |attr, value| self.public_send("#{attr}=", value) end if params super() end |
#persisted? ⇒ Boolean
23 24 25 |
# File 'lib/multi_notifier/model.rb', line 23 def persisted? false end |