mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Moved max item name length to constant [SCI-6025]
This commit is contained in:
parent
289095ecbc
commit
56fa07aa21
1 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,8 @@ class RepositoryRowsController < ApplicationController
|
|||
include ApplicationHelper
|
||||
include MyModulesHelper
|
||||
|
||||
MAX_PRINTABLE_ITEM_NAME_LENGTH = 64
|
||||
|
||||
before_action :load_repository, except: :show
|
||||
before_action :load_repository_row, only: %i(update assigned_task_list)
|
||||
before_action :check_read_permissions, except: %i(show create update delete_records copy_records)
|
||||
|
@ -99,7 +101,7 @@ class RepositoryRowsController < ApplicationController
|
|||
label_printer,
|
||||
LabelTemplate.first.render( # Currently we will only use the default template
|
||||
item_id: repository_row.code,
|
||||
item_name: repository_row.name.truncate(64)
|
||||
item_name: repository_row.name.truncate(MAX_PRINTABLE_ITEM_NAME_LENGTH)
|
||||
),
|
||||
params[:copies].to_i
|
||||
).job_id
|
||||
|
|
Loading…
Reference in a new issue