Parent

Methods

Files

Class/Module Index [+]

Quicksearch

RuboCop::Cop::Rails::Validation

This cop checks for the use of old-style attribute validation macros.

Constants

BLACKLIST
MSG

Public Instance Methods

on_send(node) click to toggle source
# File lib/rubocop/cop/rails/validation.rb, line 20
def on_send(node)
  receiver, method_name, *_args = *node
  return unless receiver.nil? && BLACKLIST.include?(method_name)

  add_offense(node, :selector)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.