Hello all,
I run my generator with --no-html
. Now, I have progressed somewhat with my app but I need a few html pages for my admin dashboard.
I added phoenix_html
but having issues like form_for
being undefined on my new.html.eex
page.
Any ideas what I could include to solve these issues?
Thanks in advance.
1 Like
Do you have a view? E.g. if your app is named “app”, and your template is for articles, then you should have a file called app_web/views/article_view.ex
. Inside that you’d have this:
defmodule AppWeb.ArticleView do
use AppWeb, :view
end
You’re probably missing imports in my_app_web.ex
.
4 Likes
Yes, I have a app_web/views/upload_view.ex
file.
@LostKobrakai Great catch!
In my_app_web.ex
I was missing this line:
def view do
quote do
......
use Phoenix.HTML # This line
.......
end
end
2 Likes
Edit: Posted in the wrong thread. Sorry guys.