如何使用f.text_area样式转换%textarea

时间:2014-12-01 06:46:16

标签: ruby-on-rails haml

我想转换

%textarea.md-input{"data-iconlibrary" => "fa", "data-provide" => "markdown", :name => "content", :rows => "10", :style => "resize: none; display: block;"}

采用此格式

= f.text_area :content, ...

怎么做?

1 个答案:

答案 0 :(得分:1)

试试这个

= text_area_tag "content", data: { iconlibrary: "fa", provide: "markdown" }, rows: "10", style: "resize: none; display: block;", class: "md-input"