railsのform_forをstylingする[和訳]
hey guys :)
form_forをhtml内でstylingできるんだね!
stack overflowからの豆知識を共有してみる。
–質問–
Is there a way to add styling to rails form_for and make it display inline?
railsのform_for
で stylingしてdisplayをinlineに出来たりするの?
–回答–
There might be a cleaner way to do this, but it works. (I tried with another nested hash, no dice)
単純かもしれないが、こうすれば出来るよ。(他のネストされたハッシュでも試してみたけど、無意味だった)
<% form_for(@model, :html => { :style => 'background-color:red;' }) do |f| %>
終
inlineについては触れられてないじゃん!汗
まぁ、記事内のコメントに「なぜinlineにしたいんだい?」って的確なツッコミがあるのは頷けるw
see you !!:)
リンク