Last active
August 29, 2015 14:22
-
-
Save yevhene/ffe028d1c70409550192 to your computer and use it in GitHub Desktop.
concat_content_tag
This file contains 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
module ActionView | |
module Helpers | |
module TextHelper | |
def method_missing(name, *args, &block) | |
if name.to_s =~ /\Aconcat_(.+)/ | |
concat public_send($1, *args, &block) | |
else | |
super | |
end | |
end | |
def respond_to_missing?(name, include_private = false) | |
if name.to_s =~ /\Aconcat_(.+)/ | |
respond_to?($1, include_private) | |
else | |
super | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment