Fix all Rails/FilePath rubocop issues
This commit is contained in:
@@ -365,12 +365,6 @@ Performance/RedundantMatch:
|
||||
- 'app/controllers/valuation/spending_proposals_controller.rb'
|
||||
- 'app/helpers/embed_videos_helper.rb'
|
||||
|
||||
# Offense count: 2
|
||||
Rails/FilePath:
|
||||
Exclude:
|
||||
- 'app/controllers/sandbox_controller.rb'
|
||||
- 'spec/spec_helper.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Include.
|
||||
|
||||
@@ -6,7 +6,7 @@ class SandboxController < ApplicationController
|
||||
helper_method(:namespace)
|
||||
|
||||
def index
|
||||
@templates = Dir.glob(Rails.root.join('app/views/sandbox/*.html.erb').to_s).map do |filename|
|
||||
@templates = Dir.glob(Rails.root.join('app', 'views', 'sandbox', '*.html.erb').to_s).map do |filename|
|
||||
filename = File.basename(filename, File.extname(filename))
|
||||
filename unless filename.starts_with?('_') || filename == 'index.html'
|
||||
end.compact
|
||||
|
||||
@@ -39,7 +39,7 @@ RSpec.configure do |config|
|
||||
config.before(:each) do |example|
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
I18n.locale = :en
|
||||
load "#{Rails.root}/db/seeds.rb"
|
||||
load Rails.root.join('db', 'seeds.rb').to_s
|
||||
end
|
||||
|
||||
config.before(:each, type: :feature) do
|
||||
|
||||
Reference in New Issue
Block a user