Module: Cheveret::Adapter::Sunspot

Defined in:
lib/cheveret/adapter/sunspot.rb

Instance Method Summary collapse

Instance Method Details

#proxyObject



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/cheveret/adapter/sunspot.rb', line 38

[ :current_page,
  :next_page,
  :offset,
  :per_page,
  :total,
  :total_entries,
  :total_pages
].each do |proxy|
  # this is really territory of will_paginate

  class_eval "    def \#{proxy}(*args)\n      return 0 unless collection.respond_to?(:\#{proxy})\n      collection.\#{proxy}(*args)\n    end\n  RUBY_EVAL\nend\n", __FILE__, __LINE__ + 1

#table_data_for(column, item) ⇒ Object



31
32
33
# File 'lib/cheveret/adapter/sunspot.rb', line 31

def table_data_for(column, item)
  item.stored(column.name)
end