lib/administrate/page/base.rb in administrate-0.1.1 vs lib/administrate/page/base.rb in administrate-0.1.2
- old
+ new
@@ -13,13 +13,11 @@
protected
def attribute_field(dashboard, resource, attribute_name, page)
value = get_attribute_value(resource, attribute_name)
-
- dashboard.
- attribute_types[attribute_name].
- new(attribute_name, value, page)
+ field = dashboard.attribute_type_for(attribute_name)
+ field.new(attribute_name, value, page)
end
def get_attribute_value(resource, attribute_name)
resource.public_send(attribute_name)
rescue NameError