lib/phlexible/rails/action_controller/implicit_render.rb in phlexible-0.4.0 vs lib/phlexible/rails/action_controller/implicit_render.rb in phlexible-0.4.1
- old
+ new
@@ -22,11 +22,13 @@
render_plex_view({ action: action_name }) || super
end
def assign_phlex_accessors(pview)
pview.tap do |view|
- view.__controller_attributes__.each do |attr|
- view.instance_variable_set :"@#{attr}", view_assigns[attr.to_s]
+ if view.respond_to?(:__controller_attributes__)
+ view.__controller_attributes__.each do |attr|
+ view.instance_variable_set :"@#{attr}", view_assigns[attr.to_s]
+ end
end
end
end
def method_for_action(action_name)