Skip to content

Instantly share code, notes, and snippets.

@aldesantis
Created January 10, 2016 14:13
Show Gist options
  • Save aldesantis/53875d55cf09cc1f2f90 to your computer and use it in GitHub Desktop.
Save aldesantis/53875d55cf09cc1f2f90 to your computer and use it in GitHub Desktop.
module Crowdster
module Models
module Campaigner
def included(klass)
klass.class_eval do
has_many :campaigns, class_name: 'Crowdster::Campaign'
end
end
end
end
end
class User < ActiveRecord::Base
include Crowdster::Models::Campaigner
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment