object false child @features, object_root: false, root: 'features' do attributes :id, :feature_type_id, :price, :price_type_id, :subtitle, :discount_percentage, :total_cost, :order_discount node :title do |feature| if feature.feature_type.multiple_variants? "#{feature.feature_type.title} #{feature.title}" else feature.title end end node :code do |feature| feature.feature_type.code end node :tip do |feature| feature.subtitle end end