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 >