/ Authentication / Devise sign in/sign up in popup

1. Add mappings

 # app/helpers/application_helper.rb

module ApplicationHelper
  def resource_name
    :user
  end

  def resource
    @resource ||= User.new
  end

  def devise_mapping
    @devise_mapping ||= Devise.mappings[:user]
  end
end

 

2. Override the controllers

# config/routes.rb

devise_for :users, :controllers => {sessions: 'sessions'}

 

3. Add your custom form (with :remote=> true)

 

ORIGINAL DISCUSSION: http://stackoverflow.com/questions/32237818/devise-sign-in-sign-up-in-popup

No video for this post.

No issues for this post.

by ryzalyusoff