aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/core.rb
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2014-06-02 16:52:39 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2014-06-02 16:52:39 -0500
commitc07d09559ec171e1904b55c7ad7e8c7d586ca51b (patch)
treeb98d4b00f5b02e11fd8da941b7bfd1de17cc570a /activerecord/lib/active_record/core.rb
parent9e4bb9991a72078a97510b01bb1010127a7a3706 (diff)
parent032a8d9dc95f40581d8cbda2c297b50edaa44e6f (diff)
downloadrails-c07d09559ec171e1904b55c7ad7e8c7d586ca51b.tar.gz
rails-c07d09559ec171e1904b55c7ad7e8c7d586ca51b.tar.bz2
rails-c07d09559ec171e1904b55c7ad7e8c7d586ca51b.zip
Merge pull request #15475 from sgrif/sg-initialize-attributes
Remove unused `initialize_attributes` method
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r--activerecord/lib/active_record/core.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 88c1fc7e4c..1d75eeda69 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -252,7 +252,7 @@ module ActiveRecord
defaults = self.class.column_defaults.dup
defaults.each { |k, v| defaults[k] = v.dup if v.duplicable? }
- @raw_attributes = self.class.initialize_attributes(defaults)
+ @raw_attributes = defaults
@column_types_override = nil
@column_types = self.class.column_types
@@ -278,7 +278,7 @@ module ActiveRecord
# post.init_with('attributes' => { 'title' => 'hello world' })
# post.title # => 'hello world'
def init_with(coder)
- @raw_attributes = self.class.initialize_attributes(coder['attributes'])
+ @raw_attributes = coder['attributes']
@column_types_override = coder['column_types']
@column_types = self.class.column_types
@@ -323,7 +323,6 @@ module ActiveRecord
##
def initialize_dup(other) # :nodoc:
cloned_attributes = other.clone_attributes(:read_attribute_before_type_cast)
- self.class.initialize_attributes(cloned_attributes, :serialized => false)
@raw_attributes = cloned_attributes
@raw_attributes[self.class.primary_key] = nil