app/presenters/tabular_data/container_config.rb
Please use Rails.root.join('path', 'to')
instead. Open
Open
CONFIG_FILE_PATH = "#{Rails.root}/config/tables/"
- Read upRead up
- Exclude checks
This cop is used to identify usages of file path joining process
to use Rails.root.join
clause.
Example:
# bad Rails.root.join('app/models/goober') File.join(Rails.root, 'app/models/goober') "#{Rails.root}/app/models/goober"
# good Rails.root.join('app', 'models', 'goober')
Freeze mutable objects assigned to constants. Open
Open
CONFIG_FILE_PATH = "#{Rails.root}/config/tables/"
- Read upRead up
- Exclude checks
This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).
Example:
# bad
CONST = [1, 2, 3]
# good
CONST = [1, 2, 3].freeze