lib/administrate/base_dashboard.rb in administrate-0.14.0 vs lib/administrate/base_dashboard.rb in administrate-0.15.0

- old
+ new

@@ -54,11 +54,14 @@ self.class::FORM_ATTRIBUTES end def permitted_attributes form_attributes.map do |attr| - attribute_types[attr].permitted_attribute(attr) + attribute_types[attr].permitted_attribute( + attr, + resource_class: self.class.model, + ) end.uniq end def show_page_attributes self.class::SHOW_PAGE_ATTRIBUTES @@ -86,10 +89,10 @@ "Attribute #{attr} could not be found in #{self.class}::ATTRIBUTE_TYPES" end def attribute_includes(attributes) attributes.map do |key| - field = self.class::ATTRIBUTE_TYPES[key] + field = attribute_type_for(key) key if field.associative? end.compact end end