# File lib/active_record/named_scope.rb, line 29 def scoped(options = nil) if options scoped.apply_finder_options(options) else if current_scope current_scope.clone else scope = relation.clone scope.default_scoped = true scope end end end