Sha256: 9d3053c3ec5e27b950673d033309b71a6db314d3556751581bc3c732340132ca
Contents?: true
Size: 859 Bytes
Versions: 10
Compression:
Stored size: 859 Bytes
Contents
class EventsController < ApplicationController layout 'whoops' def index @event_group = Whoops::EventGroup.find(params[:whoops_event_group_id]) events_base = @event_group.events unless params[:query].blank? conditions = Whoops::MongoidSearchParser.new(params[:query]).conditions events_base = events_base.where(conditions) end @events = events_base.desc(:event_time).paginate( :page => params[:page], :per_page => 20 ) puts 'test' end def show @event = Whoops::Event.find(params[:id]) respond_to do |format| format.js { render :partial => 'details', :object => @event, :as => :event} end end # TODO break this out into a more metal-y controller def create Whoops::Event.record(params[:event]) render :status => 200, :nothing => true end end
Version data entries
10 entries across 10 versions & 1 rubygems