Function DiscussWeb.model/0 is undefined or private

I am getting error when i try to visit my route

# function DiscussWeb.model/0 is undefined or private

This is my controller , folder structure

It is an old phoenix project structure, something like 1.2.

There are no contexts… and model has been replaced by schema since then.

Did You try some update on it?

DiscussWeb != Discuss.Web


Its old phoenix version here its Discuss.Web , see the opened web.ex file

Actually i want to upgrade but i cant , the lectures are on old version and he said stick with it to understand the phoenix properly no doubt we have more phoenix version but right now for deep learning stick with it, so i have to stick with this version of 1.2.5

But the error is clear…

And the error is DiscussWeb


The lectures are outdated.

I would not advise You to learn an old version… but I am not your teacher :slight_smile:

The lecturer have some concern with this phoenix version to explain things in a way that OOP developers understand Functional programming + the way phoenix application works.

Fixed it the conn needed to be return also with the html file name in template/foldername/filename.html.eex

In below image 1st window is my Model, 2nd web.ex 3rd Controller

Glad You made it… I hope You will enjoy FP, coming from OOP.

1 Like