marks 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,6 +17,7 @@ module Marks
17
17
  define_method :'marked_by?' do |marker, mark|
18
18
  classified_mark = mark.to_s.classify
19
19
  raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
20
+ return false unless marker
20
21
  klass = marker.class.table_name.classify.constantize
21
22
  klass.joins(:outgoing_marks).where('marks_marks.mark_type = ? AND markable_type = ? AND markable_id = ?', mark.to_s.classify, self.class.base_class.to_s, self).any?
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module Marks
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
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.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  segments:
110
110
  - 0
111
- hash: 2361575609532956099
111
+ hash: 4542697380966745865
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  segments:
119
119
  - 0
120
- hash: 2361575609532956099
120
+ hash: 4542697380966745865
121
121
  requirements: []
122
122
  rubyforge_project:
123
123
  rubygems_version: 1.8.23