Sha256: 37b5a540648c789bb55bdb0088971b3ff9fb904b8ae832c000ad0254dcf61825
Contents?: true
Size: 613 Bytes
Versions: 7
Compression:
Stored size: 613 Bytes
Contents
module RuboCop module Cop module Salsify # Check that Activerecord scopes do not use `unscoped` # # @example # # # good # User.strip_default_scope # # # bad # User.unscoped class RailsUnscoped < Cop MSG = 'Explicitly remove scopes instead of using `unscoped`.'.freeze def_node_matcher :unscoped?, <<-PATTERN (send _ :unscoped) PATTERN def on_send(node) return unless unscoped?(node) add_offense(node, location: :expression, message: MSG) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems