unread 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/changelog.md +4 -0
- data/lib/unread/acts_as_readable.rb +1 -1
- data/lib/unread/version.rb +1 -1
- data/test/test_helper.rb +8 -5
- metadata +5 -5
data/changelog.md
CHANGED
@@ -192,7 +192,7 @@ module Unread
|
|
192
192
|
|
193
193
|
module ReaderInstanceMethods
|
194
194
|
def read_mark_global(klass)
|
195
|
-
instance_var_name = "@read_mark_global_#{klass.name}"
|
195
|
+
instance_var_name = "@read_mark_global_#{klass.name.gsub('::','_')}"
|
196
196
|
instance_variable_get(instance_var_name) || begin # memoize
|
197
197
|
obj = self.read_marks.readable_type(klass.base_class.name).global.first
|
198
198
|
instance_variable_set(instance_var_name, obj)
|
data/lib/unread/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -12,12 +12,15 @@ ActiveRecord::Base.establish_connection(db_name)
|
|
12
12
|
ActiveRecord::Migration.verbose = false
|
13
13
|
load(File.dirname(__FILE__) + "/schema.rb")
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
module App
|
16
|
+
class Reader < ActiveRecord::Base
|
17
|
+
acts_as_reader
|
18
|
+
end
|
18
19
|
|
19
|
-
class Email < ActiveRecord::Base
|
20
|
-
|
20
|
+
class Email < ActiveRecord::Base
|
21
|
+
acts_as_readable :on => :updated_at
|
22
|
+
end
|
21
23
|
end
|
24
|
+
include App
|
22
25
|
|
23
26
|
puts "Testing with ActiveRecord #{ActiveRecord::VERSION::STRING}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unread
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Georg Ledermann
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-05-01 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activerecord
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
requirements: []
|
149
149
|
|
150
150
|
rubyforge_project: unread
|
151
|
-
rubygems_version: 1.8.
|
151
|
+
rubygems_version: 1.8.24
|
152
152
|
signing_key:
|
153
153
|
specification_version: 3
|
154
154
|
summary: Manages read/unread status of ActiveRecord objects
|