Skip to content

Instantly share code, notes, and snippets.

@danhunter
Last active December 23, 2015 23:19
Show Gist options
  • Save danhunter/6709204 to your computer and use it in GitHub Desktop.
Save danhunter/6709204 to your computer and use it in GitHub Desktop.
Some something
# in config/initializers/foo.rb
Media.send :include, MediaConcern
# in concerns/media_concern.rb
require 'active_support/concern'
module MediaConcern
extend ActiveSupport::Concern
included do
belongs_to :user
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment