Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は単純なfixture.ymlファイルを持っています:
fixture.yml
label: body: "<%= variable %>"
問題は、ERB コードがフィクスチャのロードの一部として解析されることですが、実際には本体を文字通り "<%= variable %>" (補間されていない) にしたいのです。
ERB タグをエスケープするにはどうすればよいですか?
%開始タグに 1 秒を追加します。
%
label: body: "<%%= variable %>"
<%%シーケンスは有効な ERBであり、リテラルとしてレンダリングされます<%。
<%%
<%