Thank you very much for the reply Radhames Britto

I immediately tried your first 2 suggestions and they worked out
great. My suggestion for the #2 problem is to put this in the top-
level documentation on the github page (if you have the authority to
do that... or know the author and can tell him to do that). I would
think this is something at least 50% of the people will want to
customize. In my case, I just wanted to add a simple "is_enabled"
property and check against this - something very common.

Your suggestion worked great though. My problem was that I override
"active?" rather than "active_for_authentication?" -> and this is
actually not what the RDoc's said :( So that needs to be updated so
that others are not confused like me ;)

----------

As for #3, I'm not sure I want to add devise_for in the routes. Maybe
I'm wrong here. I will explain what I want to do.

1. I want all of the routes exposed for all User models -> regardless
of subclasses and roles.

2. The only exception is that I want to a registration page for 2
specific subclasses -> all other roles are NOT to have a registration
page (they must be invited to the system by someone who is already
using it).

3. Each registration page is to be similar, but different. It would be
nice to have 2 different views, but I guess can use the same view and
have a bunch if "if this role, do this..." blocks. That might get
messy though... I'm not sure until I see what the resultant code looks
like.

So if I am to use devise routes... do I disable the registration page
for users, but add it for the other 2 roles while disabling all the
other pages?

I don't want to duplicate views for all 3 roles... and I don't want to
have 3 controllers instantiated that produce all of the same
functionality behind the scenes.

I hope I am making sense ;)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to