現在、不動産アプリの XML エクスポートを構築しています。Rails で Builder gem を使用します。そして、私は次のことを行う方法を探しています:
<commercialRent>
"commercialRent figure"
<range>
...
</range>
</commercialRent>
「Text Goes Here」部分を実装する方法が見つからないようです
私のコード:
b.commercialRent(period: "annual", plusOutgoings: self.plus_outgoings) {
self.rent_price;
b.range {
b.min(self.rent_psm_pa_min);
b.max(self.rent_psm_pa_max)
};
};
戻り値:
<commercialRent period="annual" plusOutgoings="no">
<rentPerSquareMeter>
<range>
<min>1000</min>
<max>10000</max>
</range>
</rentPerSquareMeter>
</commercialRent>
self.rent_price がないことを除いて、すべて正常に出力されます。私はそれを理解することはできません。