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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:41:12+00:00 2026-06-02T10:41:12+00:00

I have setup the rails_admin for the admin interface of my site. For one

  • 0

I have setup the rails_admin for the admin interface of my site.

For one of the Model, I want to display an additional column.

say i have name , phone , email, image url, rank etc attributes in my Model(say Student).
Then I have to display columns : Name | Rank | Preview(additional column)

In the preview column i want to display some rendered html on the basis of attributes ( email,image,url etc.) for each ‘student’.

I have found the way to include a partial for edit/update/create to provide fields/forms as per our partial. But the same implementation of including partial is failing in list/show.

So is there any way I can add the partial to show rendered content, in list/show view for a model…?

Edit: Code added

config.model Utility do
   list do
     field :code
     field :priority
     field :name
     field :url
     field :phone
     field :logo
     field :content
     sort_by :priority
     items_per_page 100
   end
end

This shows up following columns in rails_admin

Code | Priority | Name | Url | Phone | Logo | Content

what i want is
Code | Priority | Preview

in which in Preview column i want to show a html rendering content as :

blah.html (just for e.g. html for example , here i want to render in a way it is displayed in one of pages, so it is presentable for admin view too)

<div class="blah">
  <%=util.name%> <%=util.phone%> <%=util.logo%> #usage with proper divs/tags/rendering
</div >
  • 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-02T10:41:13+00:00Added an answer on June 2, 2026 at 10:41 am
    config.model Utility do
      configure :preview do
        pretty_value do
          util = bindings[:object]
          %{<div class="blah">
              #{util.name} #{util.phone} #{util.logo}
            </div >}
        end
        children_fields [:name, :phone, :logo] # will be used for searching/filtering, first field will be used for sorting
        read_only true # won't be editable in forms (alternatively, hide it in edit section)
      end
    
    
    
      list do
        field :code
        field :priority
        field :preview
      end
    
      show do
        field :code
        field :priority
        field :preview
      end
    
      # other sections will show all fields
    end
    

    Abstract:

    Show/list don’t use partials for output. Last overriding point is pretty_value.

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

Sidebar

Related Questions

I have Devise setup on a Rails Model: devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable
I have setup a process in my User model to send a bunch of
I am struggling with the route setup for a Rails application. I have installed
I have setup a Django project on my laptop and build my first app.
I have setup a Symfony 2 Data Transformer that will allow the user to
I have setup a application in my IIS7 that uses .NET Framework 4.0 (runned
I have setup web dav on windows server 2008. It seems to work fine
I have Action Mailer setup to render an email using the body attribute of
I have a simple application with a customer and appointment models, system admin can
I have to setup a rails project and rubygems.org is seemed to be down.

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.