Skip to content

Instantly share code, notes, and snippets.

Kyle Prifogle kyprifog

Block or report user

Report or block kyprifog

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kyprifog / create_user.rb
Created Mar 4, 2016
Strong Parameters in Service Object
View create_user.rb
class CreateUser
def initialize(params)
@params = user_params(params)
@user =
def perform
ActiveRecord::Base.transaction do
# do stuff
kyprifog / pluck_all.rb
Created Oct 6, 2015
Active Record Pluck All
View pluck_all.rb
# pluck_all.rb
module ActiveRecord
class Relation
def pluck_all(*args)! do |column_name|
if column_name.is_a?(Symbol) && column_names.include?(column_name.to_s)
You can’t perform that action at this time.