lib/pakyow/presenter/renderer/behavior/render_components.rb in pakyow-presenter-1.0.0.rc3 vs lib/pakyow/presenter/renderer/behavior/render_components.rb in pakyow-presenter-1.0.0.rc4
- old
+ new
@@ -103,9 +103,17 @@
#
if component_connection.app.is_a?(Plugin) && component[:class].ancestors.include?(component_connection.app.parent.isolated(:Component))
component_connection = component_connection.class.from_connection(component_connection, :@app => component_connection.app.parent)
end
+ unless component[:class].inherit_values == true
+ component_connection.values.each_key do |key|
+ unless key.to_s.start_with?("__") || (component[:class].inherit_values && component[:class].inherit_values.include?(key))
+ component_connection.values.delete(key)
+ end
+ end
+ end
+
component_instance = component[:class].new(
connection: component_connection,
config: component[:config]
)