spec/shared/app_root/app/models/post.rb in edge_rider-0.2.5 vs spec/shared/app_root/app/models/post.rb in edge_rider-0.3.0
- old
+ new
@@ -3,13 +3,9 @@
belongs_to :topic
belongs_to :author, :class_name => 'User'
has_defaults :trashed => false
-
- if respond_to?(:named_scope)
- named_scope :these, lambda { |array| { :conditions => { :id => array } } }
- else
- scope :these, lambda { |array| { :conditions => { :id => array } } }
- end
+
+ EdgeRider::Util.define_scope self, :these, lambda { |array| { :conditions => { :id => array } } }
end