spec/fixtures/topic.rb in will_paginate-3.0.4 vs spec/fixtures/topic.rb in will_paginate-3.0.5

- old
+ new

@@ -1,7 +1,11 @@ class Topic < ActiveRecord::Base has_many :replies, :dependent => :destroy, :order => 'replies.created_at DESC' belongs_to :project - scope :mentions_activerecord, :conditions => ['topics.title LIKE ?', '%ActiveRecord%'] - scope :distinct, :select => "DISTINCT #{table_name}.*" + scope :mentions_activerecord, lambda { + where(['topics.title LIKE ?', '%ActiveRecord%']) + } + scope :distinct, lambda { + select("DISTINCT #{table_name}.*") + } end