railsのdeviseのデザインをSemantic UIで作っている途中でform_forのクラスの適用の方法をミスしてしまったので、メモ。
間違い
1
2
3
|
<form class="ui large form">
<div class="ui stacked segment">
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
こっちが正しい
form_forに:html => {:class => 'ui large form'}
としてあげることでclassが適用される。
1
2
|
<%= form_for(resource, as: resource_name, :html => {:class => 'ui large form'}, url: registration_path(resource_name)) do |f| %>
<div class="ui stacked segment">
|
See Also