sure. I cannot show too much code because is kind of sensitive but Iĺl do my best.
My gems.
ruby '2.1.1'
gem 'rails', '4.2.3'
gem 'devise', '~> 3.5.2'
Some parts of my User model:
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable,
:confirmable
def after_confirmation
some code here
end
end
Part of my routes.rb
Rails.application.routes.draw do
devise_for :admin_users, ActiveAdmin::Devise.config
ActiveAdmin.routes(self)
devise_for :users, path: '', :path_names => { sign_in: 'login', sign_up: 'registro' }
authenticated :user do
root :to => "wellcome#index", as: :welcome
end
end
This is part of my Application Controller
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
def after_sign_in_path_for(resource)
case resource
when User then dashboard_path
when AdminUser then admin_dashboard_path
end
end
def after_confirmation_path_for(resource_name, resource)
redirect to dashboard_path
end
end
I'm also using custom views for registrations/sessions/mailers/confirmations/ etc.
As I said, I have neither console errors nor warnings to show you here.
Thank you 4 ur time.