activemodel 4.0.0.rc1 → 4.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 250ef70b10d4ec2e30333cfffc80da63aed87895
4
- data.tar.gz: 69c232cc5ed875faedbb29a0f0d6c1a01bcf5d19
3
+ metadata.gz: 6aa2aecf4bda96a7e235db9ea86b18694f38eb1f
4
+ data.tar.gz: 151da99081ef1acbec2e9a36b9714f152a96f381
5
5
  SHA512:
6
- metadata.gz: 0be6ba150a3151982443cf95e5c2a04da6af1b807282767e5ca44a4367830b070cbaa631dffaf3d65494a9e8cafe72f6ba19dcdb71d504c01009902a09865964
7
- data.tar.gz: 836ccca90ace183c3e7944cbefb229a369db445f34fe68289d9af0444e29058f6834b9495b5554d95180c8777517977009eb94ad5de1d4880bdbc0125616bbaa
6
+ metadata.gz: 3be8435d14cfcd59406f8690f8e870bed760dbf9040d1876debbb6312d25fcf5a776543edf41d864c22df17697656d60821bae0518223a6224c8e3c6634038be
7
+ data.tar.gz: 694318bbec36b0d99869b78f3e0c232ac17606b26821e3f2e40011750089054c40deb8c6f6e9a57c4bda2169f4f84e61d0d3d57a16dfc3a7789dccebbb449e60
@@ -1,4 +1,11 @@
1
- ## Rails 4.0.0 (unreleased) ##
1
+ ## Rails 4.0.0.rc2 (June 11, 2013) ##
2
+
3
+ * Fix regression in has_secure_password. When a password is set, but a
4
+ confirmation is an empty string, it would incorrectly save.
5
+
6
+ *Steve Klabnik* and *Phillip Calvin*
7
+
8
+ ## Rails 4.0.0.rc1 (April 29, 2013) ##
2
9
 
3
10
  * Add `ActiveModel::Errors#full_messages_for`, to return all the error messages
4
11
  for a given attribute.
@@ -98,7 +98,7 @@ module ActiveModel
98
98
 
99
99
  private
100
100
  def model
101
- assert @model.respond_to?(:to_model), "The object should respond_to to_model"
101
+ assert @model.respond_to?(:to_model), "The object should respond to to_model"
102
102
  @model.to_model
103
103
  end
104
104
 
@@ -56,8 +56,9 @@ module ActiveModel
56
56
  include InstanceMethodsOnActivation
57
57
 
58
58
  if options.fetch(:validations, true)
59
- validates_confirmation_of :password
59
+ validates_confirmation_of :password, if: lambda { |m| m.password.present? }
60
60
  validates_presence_of :password, :on => :create
61
+ validates_presence_of :password_confirmation, if: lambda { |m| m.password.present? }
61
62
 
62
63
  before_create { raise "Password digest missing on new record" if password_digest.blank? }
63
64
  end
@@ -106,9 +107,7 @@ module ActiveModel
106
107
  end
107
108
 
108
109
  def password_confirmation=(unencrypted_password)
109
- unless unencrypted_password.blank?
110
- @password_confirmation = unencrypted_password
111
- end
110
+ @password_confirmation = unencrypted_password
112
111
  end
113
112
  end
114
113
  end
@@ -1,7 +1,7 @@
1
1
  module ActiveModel
2
2
  # Returns the version of the currently loaded ActiveModel as a Gem::Version
3
3
  def self.version
4
- Gem::Version.new "4.0.0.rc1"
4
+ Gem::Version.new "4.0.0.rc2"
5
5
  end
6
6
 
7
7
  module VERSION #:nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.rc1
4
+ version: 4.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-29 00:00:00.000000000 Z
11
+ date: 2013-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.0.rc1
19
+ version: 4.0.0.rc2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.0.rc1
26
+ version: 4.0.0.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: builder
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: 1.3.1
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.0.0
107
+ rubygems_version: 2.0.2
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: A toolkit for building modeling frameworks (part of Rails).