Automatically add the little magnifying glass to the top of the table index if the table is searchable.

This commit is contained in:
Mark Rickert
2013-09-04 08:48:36 -04:00
parent 5be9a54b7f
commit 7bfcc2eaa8

View File

@@ -2,7 +2,9 @@ module ProMotion
module Table
module Indexable
def table_data_index
@promotion_table_data.filtered ? nil : @promotion_table_data.sections.collect{ |section| section[:title][0] }
index = @promotion_table_data.filtered ? nil : @promotion_table_data.sections.collect{ |section| section[:title][0] }
index.unshift("{search}") if self.class.get_searchable
index
end
end
end