Sha256: 9fdb7ed33419ed950424976b5dce04374dac6a59b2c5c0b5cd62cad7d4f88014

Contents?: true

Size: 196 Bytes

Versions: 6

Compression:

Stored size: 196 Bytes

Contents

class EmailNotifier < ActiveRecord::Observer
  observe Article, Comment

  def after_save(content)
    return true unless content.just_published?
    content.send_notifications
    true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
typo-3.99.0 app/models/email_notifier.rb
typo-3.99.3 app/models/email_notifier.rb
typo-3.99.1 app/models/email_notifier.rb
typo-3.99.2 app/models/email_notifier.rb
typo-3.99.4 app/models/email_notifier.rb
typo-4.0.0 app/models/email_notifier.rb