spec/mocks/user.rb in scoped_from-0.6.0 vs spec/mocks/user.rb in scoped_from-0.6.1
- old
+ new
@@ -1,14 +1,14 @@
class User < ActiveRecord::Base
-
+
scope :enabled, where(:enabled => true)
scope :search, lambda { |pattern|
where('firstname LIKE ? OR lastname LIKE ?', "%#{pattern}%", "%#{pattern}%")
}
scope :created_between, lambda { |after, before|
where('created_at >= ? AND created_at <= ?', after, before)
}
scope :latest, lambda {
where('created_at >= ?', 1.week.ago)
}
-
+
end
\ No newline at end of file