diff --git a/app/controllers/repository_rows_controller.rb b/app/controllers/repository_rows_controller.rb index 99d562df8..730d46677 100644 --- a/app/controllers/repository_rows_controller.rb +++ b/app/controllers/repository_rows_controller.rb @@ -33,7 +33,6 @@ class RepositoryRowsController < ApplicationController :created_by, repository_cells: :value ) - @current_user = current_user end def create diff --git a/app/helpers/repository_datatable_helper.rb b/app/helpers/repository_datatable_helper.rb index d566a867c..bd7c6ac45 100644 --- a/app/helpers/repository_datatable_helper.rb +++ b/app/helpers/repository_datatable_helper.rb @@ -7,8 +7,7 @@ module RepositoryDatatableHelper repository, columns_mappings, _team, - assigned_rows, - current_user) + assigned_rows) parsed_records = [] includes_json = { repository_cells: Extends::REPOSITORY_SEARCH_INCLUDES } @@ -37,7 +36,7 @@ module RepositoryDatatableHelper # Add custom columns record.repository_cells.each do |cell| row[columns_mappings[cell.repository_column.id]] = - display_cell_value(cell, current_user) + display_cell_value(cell) end parsed_records << row end @@ -67,8 +66,8 @@ module RepositoryDatatableHelper Constants::REPOSITORY_TABLE_DEFAULT_STATE['columns'].to_json end - def display_cell_value(cell, user) + def display_cell_value(cell) "RepositoryDatatable::#{cell.repository_column.data_type}Serializer" - .constantize.new(cell, user: user).serializable_hash + .constantize.new(cell, user: current_user).serializable_hash end end diff --git a/app/views/repository_rows/index.json.jbuilder b/app/views/repository_rows/index.json.jbuilder index 29e63f4c3..c747bd696 100644 --- a/app/views/repository_rows/index.json.jbuilder +++ b/app/views/repository_rows/index.json.jbuilder @@ -6,6 +6,5 @@ json.data do @repository, @columns_mappings, @repository.team, - @assigned_rows, - @current_user) + @assigned_rows) end