I have a problem with Rails 3 and Devise. I have 3 types of users for my Rails application:
Clients, owners and admins
routes.rb:
devise_for :admins devise_for :owners devise_for :clients
application_controller.rb:
def after_sign_in_path_for(resource) if resource == "client" "/client_accounts/" + current_client.id.to_s elsif resource == "admin" stored_location_for(:admins) || "/admin/control_panel" elsif resource == "owner" stored_location_for(:owners) || "/client_accounts" end end
My login for owners and admins works fine, but I canβt get clients to sign up for work. Here is the error I get:
NoMethodError in Devise/sessionsController#create undefined method `client_url' for #<Devise::SessionsController:0x10a98f868>
Application trace is empty.
source share