Skip to content

Instantly share code, notes, and snippets.

View bradrobertson's full-sized avatar

Brad Robertson bradrobertson

  • Toronto, ON, Canada
View GitHub Profile
# report.rb
# Aliased below. This will check for existing ReportDetail with matching attributes (all of them)
# And if it exists, set the ID, otherwise, set the report_period_detail object using the original method
# Not sure if there is some Railsy way of doing this...
def report_detail_with_find(attrs)
report_detail = ReportDetail.find_or_create_by_duration_and_display_duration_and_starting_month_and_period_offset(attrs[:duration],attrs[:display_duration],attrs[:starting_month],attrs[:period_offset])
report_detail_without_find(report_detail)
end
@bradrobertson
bradrobertson / .bash_profile
Created February 14, 2014 18:21
RVM output
source ~/.bashrc
# Homebrew
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
# Path to the bash it configuration
export BASH_IT="/Users/bradrobertson/.bash_it"
# Lock and Load a custom theme file
export BASH_IT_THEME="bobby"