Replies: 3 comments 3 replies
-
I cannot replicate this issue. I tried with the following self contained example (in a require 'roda'
class AdherentWebsite < Roda
plugin :render, escape: true, layout: '/layout_admin'
plugin :view_options
plugin :hash_routes
route do |r|
r.hash_routes('')
end
end
class AdherentWebsite
hash_routes.on 'rappels' do |r|
r.is 'preview' do
set_view_subdir 'rappels'
set_view_options(template_opts: {escape: false})
render(:inline=>"<%= '&' %>\n")
end
render(:inline=>"<%= '&' %>\n")
end
end
run AdherentWebsite Requests for Can you modify the above self contained example to show the failure case you are experiencing? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick answer. The |
Beta Was this translation helpful? Give feedback.
-
This is because I have a special layout file for this route, that is not the same as the rest of my site. Thought it was a good use case for the Your solution passing |
Beta Was this translation helpful? Give feedback.
-
Hi!
I'm using Roda and trying to use the plugin view_options to change the default behavior when rendering view. Following the doc, I wrote the folowing code:
set_view_subdir is working ok, but set_view_options has no effect, the output of <%= %> is still "html escaped". Any clue what I might have done wrong ? Is this a bug ?
Beta Was this translation helpful? Give feedback.
All reactions