小编Rai*_*lsH的帖子

在check_box_tag中添加一个类

我在网上搜索并找不到办法.到目前为止,我尝试过:

<%= check_box_tag "course[location_ids][]", location.id, class: 'checkbox-inline'%>
Run Code Online (Sandbox Code Playgroud)

这将输出:

input type: "checkbox" name="course[location_ids][] id="course_location_ids_" value="1" checked="checked"
Run Code Online (Sandbox Code Playgroud)

出于某种原因,它会进行检查输入.

<%= check_box_tag "course[location_ids][]", location.id, :class => 'checkbox-inline'%>
Run Code Online (Sandbox Code Playgroud)

和第一个一样

如何在check_box_tag中添加类

checkbox ruby-on-rails

2
推荐指数
1
解决办法
4248
查看次数

标签 统计

checkbox ×1

ruby-on-rails ×1