Created
April 16, 2014 05:53
-
-
Save googya/10813287 to your computer and use it in GitHub Desktop.
rails concern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/concern' | |
module Foo | |
extend ActiveSupport::Concern | |
included do | |
p self | |
def self.do_host_something | |
:do_host_something | |
end | |
end | |
end | |
module Bar | |
extend ActiveSupport::Concern | |
include Foo | |
included do | |
self.send(:do_host_something) | |
end | |
end | |
class Host | |
include Bar | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment