mongoid_silo 0.0.6 → 0.0.7
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.
- data/app/models/silo.rb +4 -4
- data/lib/mongoid_silo/version.rb +1 -1
- metadata +1 -1
data/app/models/silo.rb
CHANGED
@@ -18,12 +18,12 @@ class Silo
|
|
18
18
|
end
|
19
19
|
|
20
20
|
class << self
|
21
|
-
def for_id_and_class_with_name
|
22
|
-
where(item_class: class_name, item_id:
|
21
|
+
def for_id_and_class_with_name item_id, class_name, silo_name
|
22
|
+
where(item_class: class_name, item_id: item_id, silo_type: silo_name).first
|
23
23
|
end
|
24
24
|
|
25
|
-
def for_id_and_name_with_no_class
|
26
|
-
where(item_id:
|
25
|
+
def for_id_and_name_with_no_class item_id, silo_name
|
26
|
+
where(item_id: item_id, silo_type: silo_name).first
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/mongoid_silo/version.rb
CHANGED