hey_listen 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59f431f5b684c1862fab29b3bb4320876712b5c6
4
- data.tar.gz: 81d38c266e6e2b274a71e9f16b458ce673181f2d
3
+ metadata.gz: bb6d1fe117ab85cac0d0f5047e060b4220a69f18
4
+ data.tar.gz: 65941502a5dc95a4ff95509c9d500cd1ba50e948
5
5
  SHA512:
6
- metadata.gz: c56c52cbec5caad02aaf130c1d2ec75dc9aaa1095e4c1ce3c3265b6653a46146ccbb2ddafd96e7cb97fbbf1eb7cb25651f0c4b52daebe657d5b57081ceb807db
7
- data.tar.gz: 80f99daea7134a05f9ff0d1b768a231863deb036438e011059ded57202451e6bdfbf678773c12083d35587f75d83ab4e7e6c2c60e80bc72eeab13c446d42dcd1
6
+ metadata.gz: e60a62b56251fbd90368eb08a05418a239e71ad3be6a78523eb94bdec9e6e9d0d1a9d2de142b8efecfba97574854831e28241a81ae4ba9db2e46649de77aaa7d
7
+ data.tar.gz: 0c1aff4a477af1e9a39bc91cd1aa9eee496cc98166e678c8d1d1c251e4c83d5f89d59b4ae94797e6dbb215e504b4b08af116feb7c13e7598eb880b6723527a84
data/lib/hey_listen.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "hey_listen/engine"
2
2
  require 'hey_listen/acts_as_notification_receiver'
3
+ require 'hey_listen/acts_as_notifiable'
3
4
  require 'hey_listen/notifications/base'
4
5
 
5
6
  module HeyListen
@@ -0,0 +1,13 @@
1
+ module HeyListen
2
+ module ActsAsNotifiable
3
+ extend ActiveSupport::Concern
4
+
5
+ module ClassMethods
6
+ def acts_as_notifiable
7
+ has_many :notifications, as: :notifiable, class_name: 'HeyListen::Notification', dependent: :destroy
8
+ end
9
+ end
10
+ end
11
+ end
12
+
13
+ ActiveRecord::Base.send :include, HeyListen::ActsAsNotifiable
@@ -1,3 +1,3 @@
1
1
  module HeyListen
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hey_listen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Escobedo
@@ -62,6 +62,7 @@ files:
62
62
  - lib/generators/templates/initializer.rb
63
63
  - lib/generators/templates/notifications.rb
64
64
  - lib/hey_listen.rb
65
+ - lib/hey_listen/acts_as_notifiable.rb
65
66
  - lib/hey_listen/acts_as_notification_receiver.rb
66
67
  - lib/hey_listen/engine.rb
67
68
  - lib/hey_listen/notifications/base.rb