lib/active_remote/base.rb in active_remote-3.1.2 vs lib/active_remote/base.rb in active_remote-3.1.3
- old
+ new
@@ -51,13 +51,10 @@
attr_reader :last_request, :last_response
define_model_callbacks :initialize, :only => :after
def initialize(attributes = {})
- @attributes ||= begin
- attribute_names = self.class.attribute_names
- Hash[attribute_names.map { |key| [key, nil] }]
- end
+ @attributes = self.class.send(:default_attributes_hash).dup
assign_attributes(attributes) if attributes
@new_record = true