Permalink
Browse files

Merge pull request #16489 from tomkadwill/updating_options_to_new_style

[ci skip] Updated where scope documentation to conform to new style
  • Loading branch information...
1 parent b31c49c commit 1211159be686dbba5d2ef17d9af791c8ea9d2cb2 @senny senny committed Aug 13, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations.rb
@@ -1422,7 +1422,7 @@ def has_one(name, scope = nil, options = {})
# belongs_to :firm, foreign_key: "client_of"
# belongs_to :person, primary_key: "name", foreign_key: "person_name"
# belongs_to :author, class_name: "Person", foreign_key: "author_id"
- # belongs_to :valid_coupon, ->(o) { where "discounts > #{o.payments_count}" },
+ # belongs_to :valid_coupon, ->(o) { where "discounts > ?", o.payments_count },
# class_name: "Coupon", foreign_key: "coupon_id"
# belongs_to :attachable, polymorphic: true
# belongs_to :project, readonly: true

0 comments on commit 1211159

Please sign in to comment.