Forum: Rails Engines Newbie: Strange error when playing with the UserEngine

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5f79cc51f2e2e7b2bb982134e9c649e0?d=identicon&s=25 Jeroen van Doorn (Guest)
on 2006-03-21 16:17
(Received via mailing list)
Hi All,

When playing with the user engine, I've encountered the following.

When I want to "register for an account" everything goes ok...
But when I want to activate the account I end in an everlasting loop.

I've found that the code in the function "add_user_role" doesn't work
properly, though
when I set :user_role_name to another name I do get an error in my
development log ...

Any hints?

Kind regards,
Jeroen van Doorn
34f5b045aec62235c17458650ea75353?d=identicon&s=25 Steve Koppelman (hatless)
on 2006-03-22 16:31
Sorry to sound like I think everyone is running into the same bug, are
there by any chance any punctuation characters like hyphens in your
application's root path? For example /usr/local/rails-stuff/appname ...?

If that's the case, there's a one-line fix to a file in the Engines
plugin that solves this, and it's just been fixed in the trunk, but not
in any of the release versions yet.

Jeroen van Doorn wrote:
> Hi All,
>
> When playing with the user engine, I've encountered the following.
>
> When I want to "register for an account" everything goes ok...
> But when I want to activate the account I end in an everlasting loop.
>
> I've found that the code in the function "add_user_role" doesn't work
> properly, though
> when I set :user_role_name to another name I do get an error in my
> development log ...
>
> Any hints?
>
> Kind regards,
> Jeroen van Doorn
5f79cc51f2e2e7b2bb982134e9c649e0?d=identicon&s=25 Jeroen van Doorn (Guest)
on 2006-03-24 10:34
(Received via mailing list)
Sorry for the late reply,

Don't have any strange chars in my url, I've made a new test app and
there it works ok ...
As soon as I've found the error (probably my own mistake), I'll report
what is was.

Regards,
Jeroen
5f79cc51f2e2e7b2bb982134e9c649e0?d=identicon&s=25 Jeroen van Doorn (Guest)
on 2006-03-24 11:06
(Received via mailing list)
It's really strange ...

The Code for both installations is the same ...
The Database names (en content for the system roles) are the same
They are even running on the same server.

Program1 gets in an infinite loop, Program2 doesn't

Shoot me!
5f79cc51f2e2e7b2bb982134e9c649e0?d=identicon&s=25 Jeroen van Doorn (Guest)
on 2006-03-24 11:37
(Received via mailing list)
Well ... found it, but I'm not proud :S

In the user model I added a has_many relation ...
This isn't a problem, only I added it before the includes

include LoginEngine::AuthenticatedUser
include UserEngine::AuthorizedUser

Never gonna make this mistake again..

Regards,
Jeroen
This topic is locked and can not be replied to.