Fix code to pass tests for indexable.

This commit is contained in:
Mark Rickert
2013-09-04 09:21:43 -04:00
parent a2a7ae2eb6
commit 9925cfee3d
2 changed files with 4 additions and 1 deletions

View File

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

View File

@@ -13,5 +13,6 @@ class TableScreenIndexable < PM::TableScreen
end
class TableScreenIndexableSearchable < TableScreenIndexable
indexable
searchable
end