Acts As Taggable On with Rails Admin
I have installed the gem acts-as-taggable-on, everything is working well with my model, but I would like to use Rails Admin and this is where I have a problem... In the form new or edit, I would like to display the field Tags with 2 columns, the first one with the list of all the tags already recorded and the second with tags I want to use. For now, I just have a simple field, where I can enter tags with comma.
I have added the code below in rails_admin.rb:
config.model Recipe do
edit do
field :title
field :url
field :prep_time
field :cook_time
field :serve
field :picture
field :publisher
field :ingredient_lines
field :ingredients
field :tag_list do
html_attributes do
{:style => "width:90%"}
end
end
end
end
Just to give you a idea of what I want, here are a screenshot. Screenchot link Thank you for your help :)
Problem solved. I have created my own tag model, no everything is working well.
链接地址: http://www.djcxy.com/p/6110.html上一篇: 作为标签的行为在宝石轨道上不起作用
下一篇: 使用Rails Admin进行标记