Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit f251d4f

Browse files
committed
Fix scope gate issue for tags name helper generator
This should address #200
1 parent 85e915a commit f251d4f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/react/component/tags.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def method_missing(name, *params, &children)
9898
class << self
9999
def included(component)
100100
_name, parent = find_name_and_parent(component)
101-
class << parent
101+
tag_names_module = Module.new do
102102
define_method _name do |*params, &children|
103103
React::RenderingContext.render(component, *params, &children)
104104
end
@@ -107,6 +107,7 @@ class << parent
107107
React::RenderingContext.build_only(component, *params, &children)
108108
end
109109
end
110+
parent.extend(tag_names_module)
110111
end
111112

112113
private

0 commit comments

Comments
 (0)