mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
Fix hound [SCI-8007]
This commit is contained in:
parent
506c750eee
commit
36782611b4
2 changed files with 11 additions and 4 deletions
|
@ -616,7 +616,14 @@ var ProtocolsIndex = (function() {
|
|||
columns: [
|
||||
{ data: '1' }
|
||||
],
|
||||
lengthMenu: [[10, 25, 50], ['Show 10 per page', 'Show 25 per page', 'Show 50 per page']],
|
||||
lengthMenu: [
|
||||
[10, 25, 50],
|
||||
[
|
||||
I18n.t('protocols.index.linked_children.length_menu', { number: 10 }),
|
||||
I18n.t('protocols.index.linked_children.length_menu', { number: 25 }),
|
||||
I18n.t('protocols.index.linked_children.length_menu', { number: 50 })
|
||||
]
|
||||
],
|
||||
language: {
|
||||
lengthMenu: '_MENU_'
|
||||
},
|
||||
|
|
|
@ -87,9 +87,9 @@ class ProtocolLinkedChildrenDatatable < CustomDatatable
|
|||
def filter_child_records(records)
|
||||
if params[:version].present?
|
||||
version = params[:version]
|
||||
records = records.joins("LEFT JOIN protocols protocol_parents " \
|
||||
"ON protocols.parent_id = protocol_parents.id ")
|
||||
.where("protocol_parents.version_number = #{version}")
|
||||
records = records.joins('LEFT JOIN protocols protocol_parents ' \
|
||||
'ON protocols.parent_id = protocol_parents.id ')
|
||||
.where('protocol_parents.version_number = #{version}')
|
||||
end
|
||||
records
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue