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

  • Home
  • SEARCH
  • 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 7837765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:50:31+00:00 2026-06-02T14:50:31+00:00

In Active Admin (RoR), I’m getting data from a table, no problem with that.

  • 0

In Active Admin (RoR), I’m getting data from a table, no problem with that.
But I want to add a sidebar with information thats related with an inner join.
But I don’t know how to do this.

This my code:

ActiveAdmin.register Project do
   show do |project|
   ... works ...
   end
end

sidebar "Resources for this project", :only => :show do
  table_for project.project_resources.where('project_id = ?', project.id) do |row|
     column "Resource", Resource.where('id = ?', :resource_id) do |resource|
      :resource_name
    end
  end
end

As you can see, I’m trying to get the resource_name from resources-table. There is a 3th table, project_resource and this contains all the resource_ids for a project_id.

Thanks

  • 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-02T14:50:35+00:00Added an answer on June 2, 2026 at 2:50 pm

    Ok, this is the answer I was looking for:

    sidebar "Resources for this project", :only => :show do
      table_for project.resources do |resource|
        column :resource_name do |row|
          link_to row.resource_name, admin_resource_path(row)
        end
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add ordering/re-ordering to a resource in Active Admin. I understand that
Active Admin allows me to define filters that are displayed on the index page
I was downloading a csv of a model using active admin 0.3.4 that had
I'm new to Rails and I want to use Active Admin on my first
I want to be able to add fields to django admin form at runtime.
I have the following admin setup so that I can add/edit a user and
I've implemented active admin, but I was wondering how to get the default controller
In my application everything works fine, but in my Active Admin backend I don't
the active admin docs says: If you are using Rails >= 3.1, you must
I'm using Devise and Active Admin, and so far there are playing nice together.

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.