Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 647733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:45:17+00:00 2026-05-13T21:45:17+00:00

Once I added the cancan Gem to my authlogic authorisation system, I started running

  • 0

Once I added the cancan Gem to my authlogic authorisation system, I started running into problems. My link_to edit current user profile died!

code:

#application.html.erb 

<%= link_to "Edit Profile", edit_user_path(:current) %>

#ApplicationController

private
  def current_user_session
    return @current_user_session if defined?(@current_user_session)
    @current_user_session = UserSession.find
  end


  def current_user
    return @current_user if defined?(@current_user)
    @current_user = current_user_session && current_user_session.record
  end

  rescue_from CanCan::AccessDenied do |exception|
    flash[:error] = "Access denied."
    redirect_to root_url
  end

error:

ActiveRecord::RecordNotFound in UsersController#edit

Couldn't find User with ID=current

I have tried many ways to get the current user id to the edit link nothing works has anyone have any ideas?

Regards

Dan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:45:18+00:00Added an answer on May 13, 2026 at 9:45 pm

    I doubt you want to be passing the :current symbol to your edit_user_path. You likely want to have edit_user_path(current_user).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Once the added button in grid(window control Grid, not Gridview or datagrid) is clicked,
I'm overriding the OnStartup method as below within my App.xaml.cs. However, once I added
Looking for an elegant way of having scripts added once on a page and
Given a project with 2 files: fileA and fileB . Both were once added
I'm extending the ComboBox class in VB.NET and I'm running into a problem prepopulating
Once again, I'm at a loss with IE7 on this one. I'm making a
Once upon a time I was thought by more advanced web developers (gee, when
Once you've got the hang on your typical R error messages they're quite useful.
Once a push notification is sent to a device via APNS, what are normal
Once I use visualTreeHelper.getchild to find a child object, how would I get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.