marks 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/marks/marker.rb +6 -0
- data/lib/marks/version.rb +1 -1
- metadata +4 -4
data/lib/marks/marker.rb
CHANGED
@@ -29,6 +29,12 @@ module Marks
|
|
29
29
|
raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
|
30
30
|
outgoing_marks.where(mark_type: classified_mark, markable_type: markable.class.table_name.classify, markable_id: markable).destroy_all
|
31
31
|
end
|
32
|
+
|
33
|
+
define_method :'markings' do |markable_class, mark|
|
34
|
+
classified_mark = mark.to_s.classify
|
35
|
+
raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
|
36
|
+
outgoing_marks.where(mark_type: classified_mark, markable_type: markable_class.to_s.constantize.table_name.classify)
|
37
|
+
end
|
32
38
|
end
|
33
39
|
end
|
34
40
|
end
|
data/lib/marks/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
segments:
|
94
94
|
- 0
|
95
|
-
hash:
|
95
|
+
hash: -89982428989821023
|
96
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
segments:
|
103
103
|
- 0
|
104
|
-
hash:
|
104
|
+
hash: -89982428989821023
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
107
|
rubygems_version: 1.8.23
|