simply_notify 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c402df1331eba8329a5f6429b03e0a7573423f9c
4
- data.tar.gz: 8e4c9294a30137a151b534b211f6b411efdbed56
3
+ metadata.gz: d59702c28da1b3eb60ba0fbfba431c233c5b480e
4
+ data.tar.gz: 3fddbf19e496b6c120096c7018a588385c1cf6f6
5
5
  SHA512:
6
- metadata.gz: 6dbfc16fd3e2a99fb230d44deb19c682560d6664d6e3c3c7752fc9b4a31c3a9446242be3521091984294a50b04129e898d307ee1cd5552d884ff2230c4152257
7
- data.tar.gz: f906e2b31f7a3bbac724984fee837a76818d6fbad079ac2db66e25be2e11128c438ddcd35019a0825c679a5f0c84146d11ca34ade021e8e208fb3d82e05198c6
6
+ metadata.gz: 5fdc6b7bf85ee34fa32e69be958acb34793bcfd4823faedeadb6569b2576cc15191854891b2a78a0fe5ce396df5eb6fd35452ce52ca93864ea193763a1dce72b
7
+ data.tar.gz: de74be575dabd5f55868f5dbc5c618b2213cd828265cc5b43a87ec73e4658affa6f5cdae1305116c5103c14293f0929e20250e7d16fcf2ce9a28e986f523cf68
data/README.md CHANGED
@@ -27,9 +27,12 @@ Create the model and views using the generator:
27
27
  rails generate notifier
28
28
 
29
29
 
30
- Place a call in the controller where notifications are created, after the notifcation is saved:
30
+ Place a call in the controller where notifications should be created to loop through users emails, after the notifcation is saved:
31
31
 
32
- Notifier.new_notification(@user).deliver_now
32
+ @users = User.all
33
+ @users.each do |u|
34
+ Notifier.new_notification(u.email).deliver_now
35
+ end
33
36
 
34
37
 
35
38
  ## Contributing
@@ -1,3 +1,3 @@
1
1
  module SimplyNotify
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
data/lib/simply_notify.rb CHANGED
@@ -6,7 +6,7 @@ class Notifier < ActionMailer::Base
6
6
 
7
7
  def new_notification(recipient)
8
8
  @recipient = recipient
9
- mail(to: @recipient,
9
+ mail(to: @recipient.email,
10
10
  subject: 'New Notification',
11
11
  content_type: 'text/html')
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simply_notify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Lichten