routerで変更する方法。pipeline
を作って、pipe_through
で加える
pipeline :authentication_layout do
plug :put_root_layout, {Blog.LayoutView, :authentication}
end
scope "/", Blog do
pipe_through [:browser, :redirect_if_user_is_authenticated, :authentication_layout]
get "/users/register", UserRegistrationController, :new
post "/users/register", UserRegistrationController, :create
get "/users/log_in", UserSessionController, :new
post "/users/log_in", UserSessionController, :create
get "/users/reset_password", UserResetPasswordController, :new
post "/users/reset_password", UserResetPasswordController, :create
get "/users/reset_password/:token", UserResetPasswordController, :edit
put "/users/reset_password/:token", UserResetPasswordController, :update
end