Skip to content
This repository
Browse code

Change build to new

  • Loading branch information...
commit acdacead9d8ac54cfa4da1bcd3d35966c7a842e7 1 parent 3cfa36e
Denzel Morris DenzelMorris authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/active_resource/collection.rb
2  lib/active_resource/collection.rb
@@ -77,7 +77,7 @@ def first_or_create(attributes = {})
77 77 end
78 78
79 79 def first_or_initialize(attributes = {})
80   - first || resource_class.build(original_params.update(attributes))
  80 + first || resource_class.new(original_params.update(attributes))
81 81 rescue NoMethodError
82 82 raise "Cannot build resource from resource type: #{resource_class.inspect}"
83 83 end

0 comments on commit acdacea

Please sign in to comment.
Something went wrong with that request. Please try again.