phoenix controller.init/1 is undefined

by Ellison
T + -
Related App or Game

Publisher:
License: 

( resouces: phoenix controller.init/1 is undefined )

I'm building my first app in Phoenix. And I keep seeing this warning all the time in my router.ex file: warning: function DummyApiWeb.You have the router looking for the controller under 'TestWeb' (see the scope), but your controller says it's 'Test.TestController' not 'TestWeb ...


I've defined this controller: defmodule IndieInfinityWeb.SearchController do use IndieInfinityWeb, :controller def index(conn, ...As controllers are plugs, they implement both init/1 and call/2 , and it also provides a function named action/2 which is responsible for dispatching the ...Undefined functions in plain controllers and undefined live controllers don't generate any warnings. The text was updated successfully, but ...(UndefinedFunctionError) function MyApp.FooController.init/1 is undefined or private. The problem is that your test module is named the same as your controller.(UndefinedFunctionError) undefined function: HelloPhoenix.Hellocontroller.init/1 (module HelloPhoeni ... server I see the above error message. error] #PID<0.288 ... Missing: | Show results with:


... UserController.init/1 is undefined (module ChatterWeb.UserController is not available) . If this looks familiar, that's good! It means the TDD process for ...Phoenix controllers act as intermediary modules. Their functions — called actions — are invoked from the router in response to HTTP requests.It says function DemoWeb.ExampleController.init/1 is undefined which leads us to the next missing piece: a controller. That file needs to be named ...

Recommend

Advertisement

Recommend

Hots