47
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

form_forにclass名をつける

Last updated at Posted at 2017-12-26

Rails勉強中です。
とにかく勉強になったことはQiitaに投稿してします。

先日は「Railsチュートリアル」を全部やりました。

form_forにclass名をつける


<%= form_for @order, html: { class: "foo" } %>

これで自分はclass名をつけることができました。

form_forのf.submitの方にclass名をつける

ちなみにf.submitの方にclass名につける場合はこれでできました。


<% f.submit 'hogebutton', class: "btn" %>

誰かの力になれば。

47
26
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
47
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?