提交 4c6f75c8 编写于 作者: A AvnerCohen

gradually moving documentation to new hash syntax

上级 28fc8932
...@@ -156,7 +156,7 @@ def test_has_many_association_updating_a_single_record ...@@ -156,7 +156,7 @@ def test_has_many_association_updating_a_single_record
end end
def test_reject_if_with_blank_nested_attributes_id 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.accepts_nested_attributes_for :ship, :reject_if => proc {|attributes| attributes[:id].blank? }
pirate = Pirate.new(:catchphrase => "Stop wastin' me time") pirate = Pirate.new(:catchphrase => "Stop wastin' me time")
......
...@@ -43,7 +43,7 @@ def replied_topic ...@@ -43,7 +43,7 @@ def replied_topic
[ "given option that is not reserved", {:format => "jpg"}, {:format => "jpg" }] [ "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 # 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? # even when using .save instead .valid?
# [ "given on condition", {:on => :save}, {}] # [ "given on condition", {on: :save}, {}]
] ]
# validates_uniqueness_of w/ mocha # validates_uniqueness_of w/ mocha
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册