Class: ProjectSetting

Inherits:
ApplicationRecord show all
Defined in:
app/models/project_setting.rb

Instance Method Summary collapse

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order

Instance Method Details

#squash_enabled_by_default?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'app/models/project_setting.rb', line 15

def squash_enabled_by_default?
  %w[always default_on].include?(squash_option)
end

#squash_readonly?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'app/models/project_setting.rb', line 19

def squash_readonly?
  %w[always never].include?(squash_option)
end