I actually did find the answer I combed the code and found that there were two functions. I am running into a new error that is confusing me!
Now I have a new error compile error. The function does exist but, cannot be found.Do you think it was to do with the alias (referencing) the component?
Error:
== Compilation error in file lib/blog_app_web/views/post_view.ex ==
** (CompileError) lib/blog_app_web/views/post_view.ex:2: module BlogWeb is not loaded and could not be found
(elixir 1.13.3) expanding macro: Kernel.use/2
lib/blog_app_web/views/post_view.ex:2: BlogWeb.PostView (module)
Post_view.ex
:
defmodule BlogWeb.PostView do
use BlogWeb, :view
alias BlogApp.Posts
def get_comments_count(post_id) do
Posts.get_number_of_comments(post_id)
end
end