Skip to content

Instantly share code, notes, and snippets.

@yevhene
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yevhene/ffe028d1c70409550192 to your computer and use it in GitHub Desktop.
Save yevhene/ffe028d1c70409550192 to your computer and use it in GitHub Desktop.
concat_content_tag
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