Sha256: 04a959b2594092f1d9f75992ee081a6804d85a0ef00cf23af6d736c37a50d2f4

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 Bytes

Contents

module ActiveRecord
  module Scoping
    module Named
      module ClassMethods
        def valid_scope_name?(name)
          silence_names = [:page, :visible, :un_visible, :admin, :base]
          if respond_to?(name, true) && !silence_names.include?(name.to_sym)
            logger.warn "Creating scope :#{name}. " \
                      "Overwriting existing method #{self.name}.#{name}."
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ab_admin-0.1.2 lib/ab_admin/hooks/quiet_scope_page.rb
ab_admin-0.1.1 lib/ab_admin/hooks/quiet_scope_page.rb
ab_admin-0.1.0 lib/ab_admin/hooks/quiet_scope_page.rb