Skip to content
Browse files

Change build to new

  • Loading branch information...
1 parent 3cfa36e commit acdacead9d8ac54cfa4da1bcd3d35966c7a842e7 @denzel-morris denzel-morris committed Feb 7, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/active_resource/collection.rb
View
2 lib/active_resource/collection.rb
@@ -77,7 +77,7 @@ def first_or_create(attributes = {})
end
def first_or_initialize(attributes = {})
- first || resource_class.build(original_params.update(attributes))
+ first || resource_class.new(original_params.update(attributes))
rescue NoMethodError
raise "Cannot build resource from resource type: #{resource_class.inspect}"
end

0 comments on commit acdacea

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