0

I'm trying to put the devise views into modals and Rails is throwing this error which looks to be a result of routing. However, I cannot determine why.

Routes:

Rails.application.routes.draw do
  root to: 'static_pages#home'
  devise_for :users
  resources :users, only: [:show]

  match '/home', to: 'static_pages#home', via: 'get'
  match '/site_map', to: 'static_pages#site_map', via: 'get'
end

Controller:

class UsersController < ApplicationController
  before_filter :authenticate_user!

  def index
  end

  def show
    @user = User.find(params[:id])
  end

  private

end

I'm having a hard time understanding how to override default Devise behavior. It breaks easily when you don't use the standard Devise views. Is there any authentication system that uses modals instead?

Is there a checklist of actions that must happen to make this run smoothly? I have no problem setting up Devise when you want the out of the box behavior but otherwise the routing becomes a mess.

user3162553
  • 2,699
  • 3
  • 37
  • 61

0 Answers0