lib/roda/plugins/symbol_views.rb in roda-3.66.0 vs lib/roda/plugins/symbol_views.rb in roda-3.67.0

- old
+ new

@@ -21,21 +21,12 @@ # end # r.is "foo" do # :foo # end module SymbolViews - module RequestMethods - private - - # If the block result is a symbol, consider the symbol a - # template name and use the template view as the body. - def block_result_body(result) - if result.is_a?(Symbol) - scope.view(result) - else - super - end - end + def self.configure(app) + app.plugin :custom_block_results + app.opts[:custom_block_results][Symbol] = :view end end register_plugin(:symbol_views, SymbolViews) end