Sha256: 9a49655d6814e3c17db362e1b17b716f539d3e0341ead6e98be8a1b1309b977a
Contents?: true
Size: 442 Bytes
Versions: 6
Compression:
Stored size: 442 Bytes
Contents
module EnjuEvent module EnjuLibrariesController extend ActiveSupport::Concern def show search = Sunspot.new_search(Event) library_id = @library.id search.build do with(:library_id).equal_to library_id order_by(:start_at, :desc) end page = params[:event_page] || 1 search.query.paginate(page.to_i, Event.default_per_page) @events = search.execute!.results end end end
Version data entries
6 entries across 6 versions & 1 rubygems