mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-12 08:04:34 +08:00
added extends file
This commit is contained in:
parent
1d6b93829c
commit
808ec807c2
2 changed files with 17 additions and 4 deletions
|
@ -196,10 +196,6 @@ class Constants
|
|||
'text/plain'
|
||||
].freeze
|
||||
|
||||
# Notification types. Should not be freezed, as modules might append to this.
|
||||
NOTIFICATIONS_TYPES = { assignment: 0,
|
||||
recent_changes: 1,
|
||||
system_message: 2 }
|
||||
# Organization name for default admin user
|
||||
DEFAULT_PRIVATE_ORG_NAME = 'My projects'.freeze
|
||||
|
||||
|
|
17
config/initializers/extends.rb
Normal file
17
config/initializers/extends.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Extends class holds the arrays for the models enum fields
|
||||
# so that can be extended in sub modules.
|
||||
|
||||
class Extends
|
||||
# To extend the enum fields in the engine you have to put in
|
||||
# lib/engine_name/engine.rb file as in the example:
|
||||
|
||||
# > initializer 'add_additional enum values to my model' do
|
||||
# > Extends::MY_ARRAY_OF_ENUM_VALUES.merge!(value1, value2, ....)
|
||||
# > end
|
||||
# >
|
||||
|
||||
# Notification types. Should not be freezed, as modules might append to this.
|
||||
NOTIFICATIONS_TYPES = { assignment: 0,
|
||||
recent_changes: 1,
|
||||
system_message: 2 }
|
||||
end
|
Loading…
Add table
Reference in a new issue