diff options
Diffstat (limited to 'activerecord/test/models/reader.rb')
-rw-r--r-- | activerecord/test/models/reader.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/models/reader.rb b/activerecord/test/models/reader.rb index 8c7235ba9a..7c5a159fe0 100644 --- a/activerecord/test/models/reader.rb +++ b/activerecord/test/models/reader.rb @@ -1,22 +1,22 @@ class Reader < ActiveRecord::Base belongs_to :post - belongs_to :person, :inverse_of => :readers - belongs_to :single_person, :class_name => "Person", :foreign_key => :person_id, :inverse_of => :reader + belongs_to :person, inverse_of: :readers + belongs_to :single_person, class_name: "Person", foreign_key: :person_id, inverse_of: :reader belongs_to :first_post, -> { where(id: [2, 3]) } end class SecureReader < ActiveRecord::Base self.table_name = "readers" - belongs_to :secure_post, :class_name => "Post", :foreign_key => "post_id" - belongs_to :secure_person, :inverse_of => :secure_readers, :class_name => "Person", :foreign_key => "person_id" + belongs_to :secure_post, class_name: "Post", foreign_key: "post_id" + belongs_to :secure_person, inverse_of: :secure_readers, class_name: "Person", foreign_key: "person_id" end class LazyReader < ActiveRecord::Base self.table_name = "readers" default_scope -> { where(skimmer: true) } - scope :skimmers_or_not, -> { unscope(:where => :skimmer) } + scope :skimmers_or_not, -> { unscope(where: :skimmer) } belongs_to :post belongs_to :person |