scinote-web/config/initializers/extends.rb
2017-08-30 13:30:41 +02:00

53 lines
1.9 KiB
Ruby

# 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
# >
# Extends enum types. Should not be freezed, as modules might append to this.
# !!!Check all addons for the correct order!!!
NOTIFICATIONS_TYPES = { assignment: 0,
recent_changes: 1,
system_message: 2,
deliver: 5 }
TASKS_STATES = { uncompleted: 0,
completed: 1 }
REPORT_ELEMENT_TYPES = { project_header: 0,
my_module: 1,
step: 2,
result_asset: 3,
result_table: 4,
result_text: 5,
my_module_activity: 6,
my_module_samples: 7,
step_checklist: 8,
step_asset: 9,
step_table: 10,
step_comments: 11,
result_comments: 12,
project_activity: 13, # TODO
project_samples: 14, # TODO
experiment: 15,
# Higher number because of addons
my_module_repository: 17 }
# Data type name should match corresponding model's name
REPOSITORY_DATA_TYPES = { RepositoryTextValue: 0,
RepositoryDateValue: 1 }
# List of implemented core API versions
API_VERSIONS = ['20170715']
# Array used for injecting names of additional authentication methods for API
API_PLUGABLE_AUTH_METHODS = []
OMNIAUTH_PROVIDERS = []
end