diff --git a/app/controllers/universal_tables_controller.rb b/app/controllers/universal_tables_controller.rb index cf30f36..802d051 100755 --- a/app/controllers/universal_tables_controller.rb +++ b/app/controllers/universal_tables_controller.rb @@ -401,6 +401,7 @@ class UniversalTablesController < ApplicationController rows = [] entries = get_entries(params, table, page) total_pages = entries.total_pages + show_hashtags = Hashtagging.where(:hashtaggable_id.in => TableEntry.where(:u_table_id => table.id).pluck(:id)).exists? table_heads << { "title" => t("universal_table.hashtags"), "type" => "hashtag", @@ -411,7 +412,7 @@ class UniversalTablesController < ApplicationController "sort-class" => "sort hide", "sort-url" => "", "title-class" => " no-search" - } + }if show_hashtags if have_serial_number page_no_offset = (params_no.present? ? [0, params_no.to_i - 1].max : 0) serial_number_count = page_no_offset * OrbitHelper.page_data_count @@ -455,8 +456,10 @@ class UniversalTablesController < ApplicationController cols << {"text" => ""} end end - text = te.hashtags_for_frontend - cols << {"text" => text} + if show_hashtags + text = te.hashtags_for_frontend + cols << {"text" => text} + end rows << { "columns" => cols }