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 9178657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:36:15+00:00 2026-06-17T17:36:15+00:00

I have a model that needs editing that is associated with the current user

  • 0

I have a model that needs editing that is associated with the current user called BillingProfile. How can I add a menu item that links to the edit page of the current user’s BillingProfile? I don’t want or need an index page for the BillingProfile as a user can only edit their own.

class User
  has_one :billing_profile
end
  • 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-06-17T17:36:17+00:00Added an answer on June 17, 2026 at 5:36 pm

    You can use Cancan to manage the ability to allow a User to edit his own Billing Profile.

    ability.rb

    ...
    cannot :edit_billing_profile, User do |u|
      u.user_id != user.id
    end
    ...
    

    admin/users.rb

    ActiveAdmin.register User do
      action_item :only => :show do
        link_to "Edit BP", edit_bp_path(user.id) if can? :edit_billing_profile, user
      end
    end
    

    Or you can try something like this:

    ActiveAdmin.register User do
      form do |f|
        f.inputs "User" do
          f.input :name
        end
        f.inputs "Billing Profile" do
          f.has_one :billing_profile do |bp|
            w.input :address if can? :edit_billing_profile, bp.user
          end
        end
        f.buttons
      end
    end
    

    I have not test it, but I did something similar on a project.

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

Sidebar

Related Questions

I have the following data model: I am writing a WCF service that needs
I have a simple Rails 3 blog app that needs an admin user so
I have a JInternalFrame window that needs to popup a modal dialog box when
I have a model that looks like this: Performance - Location - Event -
I have a model Articles that has_many Assets which is a polymorphic model that
I have a model that contains an Address property and Latitude / Longitude properties.
I have a model that requires quite a few BooleanFields, they could be considered
I have a Model that named word. this is my word model public class
I have a model that looks like: [Serializable] public class TemplatePageModel { public PageModel
I have a partial view that sometimes needs to collect data and sometimes just

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.