Sha256: 351f81d6a8bf2b26cb570d421e9a18bd757b4c1b0470611c7f31706c1a7110db
Contents?: true
Size: 987 Bytes
Versions: 2
Compression:
Stored size: 987 Bytes
Contents
class LoggedExceptionsController < ApplicationController def index @exceptions = LoggedException.all(:select => '*, COUNT(*) as count', :group => 'group_id', :order => 'created_at DESC') end def details @exceptions = LoggedException.paginate( :page => params[:page], :per_page => 1 ).where(:group_id => params[:id]).order('created_at DESC') @exception = @exceptions.first end def remove_all LoggedException.delete_all redirect_to :action => :index end def remove_group LoggedException.delete_all(:group_id => params[:id]) redirect_to :action => :index end def remove_individual exception = LoggedException.find_by_id(params[:id]) exception.destroy if LoggedException.count(:conditions => { :group_id => exception.group_id }).zero? redirect_to :action => :index else redirect_to :action => :details, :id => exception.group_id end end def raise_error raise 'ettsinsdfjaksdnfsdfnsldfasd' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tartarus-2.3 | spec/rails_app/app/controllers/logged_exceptions_controller.rb |
tartarus-2.2 | spec/rails_app/app/controllers/logged_exceptions_controller.rb |