Skip to content

Instantly share code, notes, and snippets.

class CampaignMailer < ActionMailer::Base
def omg_notification(zomg)
mail :to => # ...
end
end
set go-=T
set bg=dark
if &background == "dark"
hi normal guibg=black
set transp=8
endif
set wildmenu
set lines=120
set columns=130
require 'airbrake'
module Delayed
class Worker
def handle_failed_job_with_aibrake(job, error)
Airbrake.notify_or_ignore(error, :cgi_data => job.attributes)
handle_failed_job_without_aibrake(job, error)
end
alias_method_chain :handle_failed_job, :aibrake
end
class Model
default_scope where(deleted_at: nil)
def destroy_without_callbacks
self.deleted_at = Time.now.utc
update_without_callbacks
end
def destroy
run_callbacks :destroy do
Server Error in '/' Application.
Sequence contains no elements
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Sequence contains no elements
Source Error: