user_notif 0.1.1 → 0.1.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95b7c7ffca29aed314c1d58456122ea452868c1f
|
4
|
+
data.tar.gz: 2bf37e634f6efaad0ada3339524da4faaf329c89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d66f633e82d573a0c67f85405f6ba5472f0cfad1641f486ae1c5b603da18156d454e7f0ef32362af89161d998521355f0b7627529174d93f10d62e6a668d336d
|
7
|
+
data.tar.gz: ee1250b150e5bc39cef7f49487c85001b7a42d20ebe64046c55aaee088ea6b07613af4cd87b326aa48318eed0884bb093b499f294ee659a1d53f4387030012c1
|
data/README.md
CHANGED
@@ -111,7 +111,7 @@ The default behavior remove the unread class on the element itself but you can o
|
|
111
111
|
|
112
112
|
### Mailer
|
113
113
|
|
114
|
-
Every notification
|
114
|
+
Every notification sends a mail by default.
|
115
115
|
You can override this in your generated model: `app/models/notifs/your_notif.rb`
|
116
116
|
|
117
117
|
The mailer views are located at `app/views/notifs/mailer/your_notif.[html,text].erb`
|
@@ -151,6 +151,20 @@ end
|
|
151
151
|
|
152
152
|
The `super` ensures default values are loaded.
|
153
153
|
|
154
|
+
If you want to customize the mailer behaviour, you can re-open the class at `app/mailers/user_notif/notif_mailer.rb`. For example, If you want to use another mail generator (such as Roadie) alongs with i18n and the Rails URL helpers or even add a layout to your emails, it would give something like this :
|
155
|
+
|
156
|
+
```ruby
|
157
|
+
# app/mailers/user_notif/notif_mailer.rb
|
158
|
+
|
159
|
+
class UserNotif::NotifMailer
|
160
|
+
include Roadie::Rails::Automatic
|
161
|
+
include DefaultUrlOptions
|
162
|
+
include Rails.application.routes.url_helpers
|
163
|
+
|
164
|
+
layout 'mailer'
|
165
|
+
end
|
166
|
+
```
|
167
|
+
|
154
168
|
## Development
|
155
169
|
|
156
170
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -1,3 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
en:
|
2
|
+
notif:
|
3
|
+
generic:
|
4
|
+
subject: 'New notification on %{app_name}!'
|
@@ -1,3 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
fr:
|
2
|
+
notif:
|
3
|
+
generic:
|
4
|
+
subject: 'Nouvelle notification de %{app_name} !'
|
data/lib/user_notif/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: user_notif
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terry Raimondo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|