Can't generate views into another directory #51
-
Hi @janko , I'm setting up I'm writing because I'm not able to generate the When I run
I expected the views to be generated into Before running that generator I set the the controller for the rails_controller { Admin::RodauthController } Here's the controller which is in `/app/controllers/admin/rodauth_controller.rb: module Admin
class RodauthController < ApplicationController
# used by Rodauth for rendering views, CSRF protection, and running any
# registered action callbacks and rescue_from handlers
layout :rodauth_layout
private
def rodauth_layout
case request.path
when rodauth(:admin).login_path,
rodauth(:admin).create_account_path,
rodauth(:admin).verify_account_path,
rodauth(:admin).reset_password_path,
rodauth(:admin).reset_password_request_path
"authentication"
else
"admin"
end
end
end
end I copied the generated views from Can you please tell me what I might be doing wrong here? Or what I'm missing? Thank you, Holden |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
The documentation was showing an incorrect option name for The reason the templates weren't picked up is that |
Beta Was this translation helpful? Give feedback.
The documentation was showing an incorrect option name for
rodauth:views
, it should be--directory
instead of--name
.The reason the templates weren't picked up is that
Admin::RodauthController
will look for templates insideapp/views/admin/rodauth
, not inapp/views/admin
.