I am trying to link to a devise users profile
Rails.application.routes.draw do
devise_for :users
#get '/users/:id', :to => 'users#show', :as => :user
resources :users
root to: "welcome#index"
My User.rb
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/avatar/:style/missing.png"
validates_attachment_content_type :avatar, :content_type => /\Aimage\/.*\Z/
end
My Link
<li><%= link_to (image_tag current_user.avatar.url(:thumb)), user_path(current_user.id), class: "navbar-link" %></li>
I have the same setup as
User profile pages with devise - Routing to show action
I am getting this error
uninitialized constant UsersController
thanks