2016-11-08 18:26:55 +08:00
|
|
|
# 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 }
|
2017-02-10 21:27:20 +08:00
|
|
|
|
|
|
|
TASKS_STATES = { uncompleted: 0,
|
2017-02-13 22:42:28 +08:00
|
|
|
completed: 1 }
|
2016-11-08 18:26:55 +08:00
|
|
|
end
|