What is the equivalent of match 'aliased/route/here' => 'pointed/route/here'
?
I'm banging my head on the wall here, because I can't get Devise to work with different login url's for the same model. If anyone has tips regarding this issue, I appreciate it!
The current version of my routes looks like this:
auth.devise_for :somerole, :class_name => 'MainRole', :as => 'niceurl'
auth.devise_for :anotherrole, :class_name => 'MainRole', :as => 'otherurl'
But the :class_name
option does not all the work: I'm still required to create all the appropiate helpers for every role I define.
I am currently using Devise 1.x in a Rails 2.3.8 environment, so that's why the solution offered on Github and mentioned on other questions won't work.
Thanks in advance!
Update
Okay, so I found a workaround for Devise to work: I created a method in my application_controller
that collects all my different roles and assigns it to the mainrole like so:
def current_mainrole
current_somerole || current_anotherrole
end
I'm afraid it might introduce some securityleaks and it really looks like a hack, so I'm hoping still someone can help me out with the routing issue.