Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

gradually moving documentation to new hash syntax

  • Loading branch information...
commit 4c6f75c86608d331b443eec266e2561bc9b4286a 1 parent 28fc893
@AvnerCohen AvnerCohen authored
2  activerecord/test/cases/nested_attributes_test.rb
@@ -156,7 +156,7 @@ def test_has_many_association_updating_a_single_record
def test_reject_if_with_blank_nested_attributes_id
- # When using a select list to choose an existing 'ship' id, with :include_blank => true
+ # When using a select list to choose an existing 'ship' id, with include_blank: true
Pirate.accepts_nested_attributes_for :ship, :reject_if => proc {|attributes| attributes[:id].blank? }
pirate = => "Stop wastin' me time")
2  activerecord/test/cases/validations/i18n_validation_test.rb
@@ -43,7 +43,7 @@ def replied_topic
[ "given option that is not reserved", {:format => "jpg"}, {:format => "jpg" }]
# TODO Add :on case, but below doesn't work, because then the validation isn't run for some reason
# even when using .save instead .valid?
- # [ "given on condition", {:on => :save}, {}]
+ # [ "given on condition", {on: :save}, {}]
# validates_uniqueness_of w/ mocha

3 comments on commit 4c6f75c


As per rails/rails#7890 my intention is to help by trying to migrate all documentation to new hash syntax.

I created a simple helper for that:

I will start by running this manually folder by folder to reduce the risk.


Please take care in checking for edge cases.


Trying my best :)
Mainly by going through ll automatic changes manually as well.

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