% child_key = association[:child_key].first collection = MerbAdmin::AbstractModel.new(association[:parent_model]).all.map{|o| [o.id, object_name(o)]}.sort_by{|o| o[1]} selected = @object.send(child_key) label = association[:pretty_name] required = false errors_exist = !(@object.errors[child_key].nil? || @object.errors[child_key].empty?) @properties.select{|property| property[:name] == child_key}.each do |property| required = true unless property[:nullable?] end %>