Skip to content

Instantly share code, notes, and snippets.

View nbarthel's full-sized avatar

Nic Barthelemy nbarthel

View GitHub Profile
@nbarthel
nbarthel / arel_helpers.rb
Created March 1, 2023 10:05 — forked from hadees/arel_helpers.rb
Arel Helpers
module ArelHelpers
extend self
def self.included(base)
base.extend self
end
def asterisk(arel_table_or_model)
arel_table, columns = case arel_table_or_model
when Arel::Table

Keybase proof

I hereby claim:

  • I am nbarthel on github.
  • I am nbarthel (https://keybase.io/nbarthel) on keybase.
  • I have a public key ASBsVcLqsw2yXBJ4FInCp5lFCbo2QYqxINKXc8XBNsLr8wo

To claim this, I am signing this object:

@nbarthel
nbarthel / keybase.md
Last active September 10, 2019 06:55

Keybase proof

I hereby claim:

  • I am nbarthel on github.
  • I am nbarthel (https://keybase.io/nbarthel) on keybase.
  • I have a public key ASDFv1PVmZfb2IpA5cbz6iGTsr0z8L7BIcwCK5wzgktSJQo

To claim this, I am signing this object:

# Allows you to build a Hash in a fashion very similar to Builder. Example:
# Fork of https://gist.github.com/360506 by BrentD with some enhancements
#
# HashBuilder.build! do |h|
# h.name "Nilesh"
# h.skill "Ruby"
# h.skill "Rails" # multiple calls of the same method will collect the values in an array
# h.location "Udaipur, India" do # If a block is given, first argument will be set as value for :name
# h.location do
# h.longitude 24.57