mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-25 11:56:02 +08:00
Fix code to pass tests for indexable.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -13,5 +13,6 @@ class TableScreenIndexable < PM::TableScreen
|
||||
end
|
||||
|
||||
class TableScreenIndexableSearchable < TableScreenIndexable
|
||||
indexable
|
||||
searchable
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user