eventifier 0.0.10 → 0.0.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d52731cd16ffb326dcbbe039e149bc442971937
|
4
|
+
data.tar.gz: e7ebe723f92488ea85e6e56035df3e6587024d7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66f36403d9168dd4f495999c4f2a33ac37f02b27016328413164617c88544fdfc3cf9c938022c8e8b1e12dfb12ce1588baf1b5b5bcc8b5b04dc51c37010fd6f2
|
7
|
+
data.tar.gz: 5c7bdc1a45b559b0fdb1b2784f9327f24232c3273d7648fc856f741e5f05de11c90a2dbe3ca7946b6b27cbf1a3e7fc24ce5ff465e8e558ccf399ae22ba5a1247
|
data/README.textile
CHANGED
@@ -92,6 +92,14 @@ h4. Customise views
|
|
92
92
|
|
93
93
|
h2. Sending of emails
|
94
94
|
|
95
|
+
Firstly, you'll need to set the FROM address for the Eventifier mailer
|
96
|
+
|
97
|
+
<pre><code>
|
98
|
+
# config/initializers/eventifier.rb
|
99
|
+
Eventifier.mailer_sender = 'Funways <team@funways.me>'
|
100
|
+
</code></pre>
|
101
|
+
|
102
|
+
|
95
103
|
You want to add a scheduled task to run the following task every x minutes
|
96
104
|
|
97
105
|
<pre><code>
|
@@ -19,6 +19,12 @@ class Eventifier::NotificationsController < Eventifier::ApplicationController
|
|
19
19
|
"notifications.created_at > ?", current_user.notifications_last_read_at
|
20
20
|
) if params[:recent]
|
21
21
|
|
22
|
+
if params[:since]
|
23
|
+
scope = scope.order("notifications.created_at ASC")
|
24
|
+
else
|
25
|
+
scope = scope.order("notifications.created_at DESC")
|
26
|
+
end
|
27
|
+
|
22
28
|
scope
|
23
29
|
end
|
24
30
|
|
@@ -11,7 +11,6 @@ module Eventifier
|
|
11
11
|
validates :user, :presence => true
|
12
12
|
validates :event_id, :uniqueness => { :scope => :user_id }
|
13
13
|
|
14
|
-
default_scope order("notifications.created_at DESC")
|
15
14
|
scope :for_events, -> ids { where(event_id: ids) }
|
16
15
|
scope :for_user, -> user { where(user_id: user.id) }
|
17
16
|
scope :since, -> date { where("created_at > ?", date) }
|
data/eventifier.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = "eventifier"
|
4
|
-
s.version = '0.0.
|
4
|
+
s.version = '0.0.11'
|
5
5
|
s.authors = ["Nathan Sampimon", "Peter Murray", "Pat Allan"]
|
6
6
|
s.email = ["nathan@inspire9.com"]
|
7
7
|
s.homepage = "http://github.com/inspire9/eventifier"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Sampimon
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-08-
|
13
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|