test/lib/models/company.rb in arid_cache-1.3.6 vs test/lib/models/company.rb in arid_cache-1.4.0
- old
+ new
@@ -1,6 +1,7 @@
require 'arid_cache'
class Company < ActiveRecord::Base
- named_scope :owned, :conditions => ['owner_id is not null']
+
+ send(Rails.rails3? ? :scope : :named_scope, :owned, :conditions => ['owner_id is not null'])
belongs_to :owner, :class_name => 'User'
end
\ No newline at end of file