我在Active Admin中有一个编辑表单,我需要将某些字段设置为只读。
我的当前编辑页面如下所示:
我需要让页面看起来像这样:
如何实现呢?我的编辑表单页面代码如下:
form :html => { :enctype => "multipart/form-data" } do |f|
f.inputs "Users" do
f.input :device, :label => 'Device', :as => :select, :collection => DEVICE, :include_blank => false
f.input :current_address, :label => 'Current Address', :as => :string
end
end
请帮忙。