lib/generators/ab_admin/model/templates/resource.erb in ab_admin-0.8.3 vs lib/generators/ab_admin/model/templates/resource.erb in ab_admin-0.9.0
- old
+ new
@@ -1,13 +1,16 @@
class AbAdmin<%= model.name %> < AbAdmin::AbstractResource
permitted_params :all
<% if model.respond_to?(:acts_as_nested_set_options) -%>
- settings index_view: 'tree'
+ settings index_views: [:tree]
<% else -%>
table do
<% index_attrs.without('id', 'updated_at').each do |attr| -%>
- field :<%= attr -%><%= ', sortable: false' if translated_columns.include?(attr) %>
+ field :<%= attr -%><%= ', sortable: false' if translated_columns.include?(attr.to_s) %>
+<% end -%>
+<% translated_columns.each do |attr| -%>
+ field :<%= attr -%>, sortable: false
<% end -%>
end
search do
<% index_attrs.each do |attr| -%>
\ No newline at end of file