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: fae6ed30aafe5b7714dedfb3bf300dcb8edc9bb9
4
- data.tar.gz: c86e89b53e3fdf85056fa19a85cc31b0925e45ed
3
+ metadata.gz: 9d52731cd16ffb326dcbbe039e149bc442971937
4
+ data.tar.gz: e7ebe723f92488ea85e6e56035df3e6587024d7b
5
5
  SHA512:
6
- metadata.gz: 22c5781bc59fbcf3ddb08c388ff6bb8a829bb0ce36190f5a8e4403ae9ba2c98a18eab2e983bb39afee29c7e8d3176027b4b511e42f1d5c2e843e676f27fd15b4
7
- data.tar.gz: 98db09a201956715d8cd13fe7dd981f8a58811cc4cc8137ee5fb5649a366ea0dee2ab20841a137f25d18ae9542334c7a1527a375ca376d998a0c9142306f179c
6
+ metadata.gz: 66f36403d9168dd4f495999c4f2a33ac37f02b27016328413164617c88544fdfc3cf9c938022c8e8b1e12dfb12ce1588baf1b5b5bcc8b5b04dc51c37010fd6f2
7
+ data.tar.gz: 5c7bdc1a45b559b0fdb1b2784f9327f24232c3273d7648fc856f741e5f05de11c90a2dbe3ca7946b6b27cbf1a3e7fc24ce5ff465e8e558ccf399ae22ba5a1247
@@ -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) }
@@ -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.10'
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.10
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-16 00:00:00.000000000 Z
13
+ date: 2013-08-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails