bookmarker 0.0.1 → 0.0.2

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.
@@ -36,8 +36,12 @@ module Bookmarker
36
36
 
37
37
  end
38
38
 
39
- def find_bookmarks extra_conditions = {}
40
- bookmarks.where(extra_conditions)
39
+ def find_bookmarks bookmarkable_model
40
+ bookmarks.where(:bookmarkable_type => bookmarkable_model.base_class.name.to_s)
41
+ end
42
+
43
+ def remove_bookmarks
44
+ bookmarks.delete_all
41
45
  end
42
46
 
43
47
  def unbookmark bookmarkable
@@ -15,7 +15,7 @@ module Bookmarker
15
15
  def default_conditions
16
16
  {
17
17
  :bookmarkable_id => self.id,
18
- :bookmarkable_type => self.class.name.to_s
18
+ :bookmarkable_type => self.base_class.name.to_s
19
19
  }
20
20
  end
21
21
 
@@ -1,3 +1,3 @@
1
1
  module Bookmarker
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookmarker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: