Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using 1.8.7 syntax for 3-2-stable

  • Loading branch information...
commit b75c8e58ab2ea055324c6f95127b5b940e758d57 1 parent d293990
Arun Agrawal arunagw authored
2  activerecord/test/cases/associations/has_many_associations_test.rb
View
@@ -1496,7 +1496,7 @@ def test_has_many_assignment_with_custom_primary_key
david = people(:david)
assert_equal ["A Modest Proposal"], david.essays.map(&:name)
- david.essays = [Essay.create!(name: "Remote Work" )]
+ david.essays = [Essay.create!(:name => "Remote Work" )]
assert_equal ["Remote Work"], david.essays.map(&:name)
end
8 activerecord/test/cases/autosave_association_test.rb
View
@@ -781,17 +781,17 @@ def test_when_new_record_a_child_marked_for_destruction_should_not_affect_other_
end
def test_should_save_new_record_that_has_same_value_as_existing_record_marked_for_destruction_on_field_that_has_unique_index
- Bird.connection.add_index :birds, :name, unique: true
+ Bird.connection.add_index :birds, :name, :unique => true
- 3.times { |i| @pirate.birds.create(name: "unique_birds_#{i}") }
+ 3.times { |i| @pirate.birds.create(:name => "unique_birds_#{i}") }
@pirate.birds[0].mark_for_destruction
- @pirate.birds.build(name: @pirate.birds[0].name)
+ @pirate.birds.build(:name => @pirate.birds[0].name)
@pirate.save!
assert_equal 3, @pirate.birds.reload.length
ensure
- Bird.connection.remove_index :birds, column: :name
+ Bird.connection.remove_index :birds, :column => :name
end
# Add and remove callbacks tests for association collections.
2  activerecord/test/models/person.rb
View
@@ -27,7 +27,7 @@ class Person < ActiveRecord::Base
has_many :agents_posts, :through => :agents, :source => :posts
has_many :agents_posts_authors, :through => :agents_posts, :source => :author
- has_many :essays, primary_key: "first_name", foreign_key: "writer_id"
+ has_many :essays, :primary_key => "first_name", :foreign_key => "writer_id"
scope :males, :conditions => { :gender => 'M' }
scope :females, :conditions => { :gender => 'F' }
Please sign in to comment.
Something went wrong with that request. Please try again.