lib/brakeman/checks/check_validation_regex.rb in brakeman-3.0.5 vs lib/brakeman/checks/check_validation_regex.rb in brakeman-3.1.0
- old
+ new
@@ -16,18 +16,18 @@
FORMAT = Sexp.new(:lit, :format)
def run_check
active_record_models.each do |name, model|
@current_model = name
- format_validations = model[:options][:validates_format_of]
+ format_validations = model.options[:validates_format_of]
if format_validations
format_validations.each do |v|
process_validates_format_of v
end
end
- validates = model[:options][:validates]
+ validates = model.options[:validates]
if validates
validates.each do |v|
process_validates v
end