mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-26 17:51:47 +08:00
SCI-3232 renaming the attribute name so it doesnt get 'constantized'
This commit is contained in:
parent
cee3796f35
commit
9a30d7be9d
6 changed files with 11 additions and 11 deletions
|
@ -225,7 +225,7 @@ class ResultAssetsController < ApplicationController
|
|||
project: @my_module.experiment.project,
|
||||
message_items: {
|
||||
result: result.id,
|
||||
result_type: t('activities.result_type.asset')
|
||||
type_of_result: t('activities.result_type.asset')
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
@ -190,7 +190,7 @@ class ResultTablesController < ApplicationController
|
|||
project: @my_module.experiment.project,
|
||||
message_items: {
|
||||
result: @result.id,
|
||||
result_type: t('activities.result_type.table')
|
||||
type_of_result: t('activities.result_type.table')
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
@ -218,7 +218,7 @@ class ResultTextsController < ApplicationController
|
|||
project: @my_module.experiment.project,
|
||||
message_items: {
|
||||
result: @result.id,
|
||||
result_type: t('activities.result_type.text')
|
||||
type_of_result: t('activities.result_type.text')
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ class ResultsController < ApplicationController
|
|||
team: @my_module.experiment.project.team,
|
||||
project: @my_module.experiment.project,
|
||||
message_items: { result: @result.id,
|
||||
result_type: result_type })
|
||||
type_of_result: result_type })
|
||||
flash[:success] = t('my_modules.module_archive.delete_flash',
|
||||
result: @result.name,
|
||||
module: @my_module.name)
|
||||
|
|
|
@ -66,12 +66,12 @@ module Activities
|
|||
def try_to_constantize(key)
|
||||
const_name = key.to_s.camelize
|
||||
# Remove last part from and with '_xxx..x'
|
||||
const_name_shorted = key.to_s.sub(/_[^_]*\z/, '').camelize
|
||||
const_name_short = key.to_s.sub(/_[^_]*\z/, '').camelize
|
||||
|
||||
if Extends::ACTIVITY_MESSAGE_ITEMS_TYPES.include? const_name
|
||||
const_name.constantize
|
||||
elsif Extends::ACTIVITY_MESSAGE_ITEMS_TYPES.include? const_name_shorted
|
||||
const_name_shorted.constantize
|
||||
elsif Extends::ACTIVITY_MESSAGE_ITEMS_TYPES.include? const_name_short
|
||||
const_name_short.constantize
|
||||
else
|
||||
false
|
||||
end
|
||||
|
|
|
@ -32,13 +32,13 @@ en:
|
|||
create_report_html: "%{user} created report %{report}."
|
||||
edit_report_html: "%{user} edited report %{report}."
|
||||
delete_report_html: "%{user} deleted report %{report}."
|
||||
add_result_html: "%{user} added %{result_type} result %{result}."
|
||||
edit_result_html: "%{user} edited %{result_type} result %{result}."
|
||||
add_result_html: "%{user} added %{type_of_result} result %{result}."
|
||||
edit_result_html: "%{user} edited %{type_of_result} result %{result}."
|
||||
add_comment_to_result_html: "%{user} commented on result %{result}."
|
||||
edit_result_comment_html: "%{user} edited comment on result %{result}."
|
||||
delete_result_comment_html: "%{user} deleted comment on result %{result}."
|
||||
archive_result_html: "%{user} archived %{result_type} result %{result}."
|
||||
destroy_result_html: "%{user} deleted %{result_type} result %{result}."
|
||||
archive_result_html: "%{user} archived %{type_of_result} result %{result}."
|
||||
destroy_result_html: "%{user} deleted %{type_of_result} result %{result}."
|
||||
create_module_html: "%{user} created task %{my_module}."
|
||||
clone_module_html: "%{user} copied task %{my_module_new} from task %{my_module_original} as template."
|
||||
archive_module_html: "%{user} archived task %{my_module}."
|
||||
|
|
Loading…
Reference in a new issue