Forum: Rails Engines Forwarding to login-page fails for user-engine if used withi

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Joerg B. (Guest)
on 2006-05-14 17:16
(Received via mailing list)
Hello there,

I am using the user and login engine in my application, and it works
perfectly when used in 'normal' controllers, but when used in a
like 'admin/general', it does not work properly, because when going to
http://localhost/3000/admin/general I get the following:

Routing Error

Recognition failed for "/admin/user/login"

The admin/general_controller.rb file looks like this:

class Admin::GeneralController < ApplicationController
  before_filter :login_required

  def index

Is there a smooth way around this without touching the original

Thanks and all the best,
-Joerg B.
James A. (Guest)
on 2006-05-15 01:21
(Received via mailing list)
It's quite possible that the login engine is redirecting to
:controller => 'user', rather than :controller => '/user' (the latter
being necessary to escape out of user modules), though you'd need to
check the code for that.

If that's the case, submit a ticket and it'll get patched up forthwith.

- james
This topic is locked and can not be replied to.