Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.47 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Different registration process with devise / cancan but only one User model?
  2. devise_for :users, :controllers => { :registrations => "registrations" } do
  3.   get '/author/sign_up', :to => 'registrations#new'
  4.   get '/client/sign_up', :to => 'registrations#new'      
  5. end
  6.        
  7. - if request.fullpath =~ //author/sign_up/
  8.   - session[:registration] = "author"
  9.   = render 'author'
  10. - elsif request.fullpath =~ //client/sign_up/
  11.   - session[:registration] = "client"
  12.   = render 'client' '