You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use a layout as a base for all of my views so my controller looks like:
defmodule ElixirWeberTest.Main do
use Weber.Controller
layout "application.html"
def index([], _conn) do
{:render, [], []}
end
def show([], _conn) do
{:render, [foo: 'foo'], []}
end
end
When I load the view for show get a page in the browser that looks like:
Yes. I believe this is an issue. I think I've actually seen it before. I do know that the workaround is to replace the content_for_layout with an evaluation of the string passed in:
Therefore, the layout manager probably just needs to make sure that it evaluates the content passed in. If you can make a pull-request for this, that would be fantastic.
I want to use a layout as a base for all of my views so my controller looks like:
When I load the view for
show
get a page in the browser that looks like:hi <%= 'Tom' %>
<%= @foo %>
If I remove
use Weber.Controller
andlayout "application.html"
then the view loads correctly displaying values in place of the tags.Not sure if this is a bug or if I am doing something wrong. If this is confirmed as a bug then I am happy to work on a fix :)
The text was updated successfully, but these errors were encountered: