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:
parent
83f7c25dfc
commit
c1ff1392db
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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?(".")
|
||||
|
|
Loading…
Reference in a new issue