1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix rubocop offences

This commit is contained in:
Ryuta Kamizono 2019-04-30 17:52:05 +09:00
parent 83f7c25dfc
commit c1ff1392db
2 changed files with 3 additions and 3 deletions

View file

@ -49,9 +49,9 @@ module ActiveRecord
attr_reader :model, :name, :attribute_names
def initialize(model, name)
def initialize(model, method_name)
@model = model
@name = name.to_s
@name = method_name.to_s
@attribute_names = @name.match(self.class.pattern)[1].split("_and_")
@attribute_names.map! { |name| @model.attribute_aliases[name] || name }
end

View file

@ -20,7 +20,7 @@ end
mismatches = []
check_directory = ->(directory, parent) do
# test/mailers/previews might not exist.
return unless File.exists?(directory)
return unless File.exist?(directory)
Dir.foreach(directory) do |entry|
next if entry.start_with?(".")