Reputation: 315
I have an engine called hq_core, and I have another rails app called hq.
hq_core has a devise user installed within it and it works perfectly from hq. I did this using this how-to
I want to create a devise admin_user that is only in hq, not hq_core. I ran the typical 'rails g devise admin_user' which installed find in hq.
But when I hit localhost:3000/admin_users/sign_in, it says
ActionView::Template::Error (undefined method `admin_user_session_path' for #<ActionDispatch::Routing::RoutesProxy:0x007fb454403818>):
This is a rails 4 application with Devise 3.0.0rc
Upvotes: 4
Views: 1086
Reputation: 1797
I just had the same problem which I solved by adding
Devise.setup do |config|
config.router_name = :<your engine name here>
end
to my config/initializers/devise.rb as stated in the how to.
Upvotes: 1