app/controllers/lookbook/previews_controller.rb in lookbook-0.7.2.beta.3 vs app/controllers/lookbook/previews_controller.rb in lookbook-0.7.2.beta.4

- old
+ new

@@ -64,19 +64,19 @@ render_args = @preview.render_args(example.name, params: preview_controller.params.permit!) has_template = render_args[:template] != "view_components/preview" { label: example.label, notes: example.notes, - html: preview_controller.render_example_to_string(@preview, example.name), + html: preview_controller.process(:render_example_to_string, @preview, example.name), source: has_template ? example.template_source(render_args[:template]) : example.method_source, source_lang: has_template ? example.template_lang(render_args[:template]) : example.source_lang, params: example.params } end def render_examples(examples) - preview_controller.render_in_layout_to_string("layouts/lookbook/preview", {examples: examples}, @preview.layout) + preview_controller.process(:render_in_layout_to_string, "layouts/lookbook/preview", {examples: examples}, @preview.layout) end def set_params # cast known params to type @example.params.each do |param| @@ -165,10 +165,9 @@ } elsif exception.is_a?(ActionView::Template::Error) & exception.message.include?("implements a reserved method") message_parts = exception.message.split("\n").first.split component_class = message_parts.first.constantize naughty_method = message_parts.last.delete("#").delete("`").delete(".") - p naughty_method method = component_class.instance_method(naughty_method.to_sym) if method { file_path: method.source_location.first, line_number: method.source_location[1]