mongoid_embedded_helper 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -67,17 +67,13 @@ module Mongoid::Document
67
67
  respond_to? key
68
68
  end
69
69
 
70
- def adjust!(attrs = {})
71
- run_callbacks(:before_update)
70
+ def adjust!(attrs = {})
72
71
  (attrs || {}).each_pair do |key, value|
73
72
  next if !present? key # only add to properties already present!
74
73
  adjust_by_proc!(key, value) if value.kind_of?(Proc)
75
74
  adjust_by_symbol!(key, value) if value.kind_of?(Symbol) || value.kind_of?(String)
76
75
  adjust_by_number!(key, value) if value.kind_of?(Numeric) # only add integer values
77
76
  end
78
- identify if id.blank?
79
- notify
80
- run_callbacks(:after_update)
81
77
  self
82
78
  end
83
79
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongoid_embedded_helper}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kristian Mandrup"]
12
- s.date = %q{2010-07-05}
12
+ s.date = %q{2010-07-06}
13
13
  s.description = %q{Facilitates performing queries on collections in embedded Mongoid documents by performing query from the root node}
14
14
  s.email = %q{kmandrup@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -6,7 +6,12 @@ class Person
6
6
  include Mongoid::Document
7
7
  include Mongoid::EmbeddedHelper
8
8
  field :name, :type => String
9
- embeds_many :lists
9
+ embeds_many :lists
10
+
11
+ # after_update :do_it
12
+ # def do_it
13
+ # puts "hello"
14
+ # end
10
15
  end
11
16
 
12
17
  class PosPerson
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristian Mandrup
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-05 00:00:00 +02:00
17
+ date: 2010-07-06 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency