Skip to content

Commit

Permalink
Change build to new
Browse files Browse the repository at this point in the history
  • Loading branch information
denzel-morris committed Feb 7, 2013
1 parent 3cfa36e commit acdacea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_resource/collection.rb
Expand Up @@ -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
Expand Down

0 comments on commit acdacea

Please sign in to comment.