mongoid_silo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,9 +16,9 @@ module MongoidSilo
16
16
  def update_silo name, method
17
17
  puts "[SILO] Creating or Updating Silo for #{@item_class}::::#{@item_id}"
18
18
  @item = @item_class.classify.constantize.send(:find, @item_id)
19
- @silo = Silo.where(item_class: @item_class, item_id: @item_id).first
19
+ @silo = Silo.where(item_class: @item_class, item_id: @item_id, silo_type: name).first
20
20
  if @silo
21
- @silo.set(:bag, @item.to_silo)
21
+ @silo.set(:bag, @item.send(method))
22
22
  else
23
23
  @silo = Silo.create(item_class: @item_class, item_id: @item_id, bag: @item.send(method), silo_type: name)
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module MongoidSilo
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_silo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: