class Schemas::Paginate
Protected Instance Methods
searched(items, search)
click to toggle source
Calls superclass method
PaginationSearch::HashPaginate#searched
# File lib/schemas/paginate.rb, line 5 def searched(items, search) search = expand_dot_notation(search) if /\A[A-z0-9]+\.[A-z0-9]+\z/ =~ search super(items, search) end
sorted(items, _)
click to toggle source
# File lib/schemas/paginate.rb, line 10 def sorted(items, _) items.sort_by { |i| "#{i[:schema]}.#{i[:table]}.#{i[:column]}" }.reverse end
Private Instance Methods
expand_dot_notation(search)
click to toggle source
# File lib/schemas/paginate.rb, line 16 def expand_dot_notation(search) schema, table = search.split('.') "schema:#{schema} table:#{table} match_type:exact" end