For list(&show) view of one of my Model , I want to show additional
column which would be a rendered html on the basis of values of
attributes of the instance of model.
How can I do that. Currenlty I have only found way to include partials
only for 'Edit'(,create,update) view only. But i have to render such
thing in list,show view.
--
Some code for reference and explanation:
My model registered in rails_admin:
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 :
<div class="blah">
<%=
util.name%> <%=util.phone%> <%=util.logo%> .... #usage with
proper divs/tags/rendering
</div >
so that admin interface can properly view the data, as it is exactly
visible to users in one of the pages.