如何在提交后保存已检查的check_box_tag,没有JS?

时间:2016-08-31 09:11:38

标签: ruby-on-rails checkbox

我有搜索方法的视图,如果我想选择某种搜索,我必须在框中查看。如何在提交后保存选中的复选框?

search.html.haml
         .panel-heading
            #collapse0.panel-collapse.collapse.in
              %ul.list-group
                %li.list-group-item
                  .checkbox
                    %label
                      = check_box_tag :day
                      Last day
                      .checkbox
                    %label
                      = check_box_tag :week
                      Last week
                      .checkbox
                    %label
                      = check_box_tag :mounth
                      Last mounth
                %li.list-group-item
                  .checkbox
                    %label
                      = check_box_tag :post
                      All
                %li.list-group-item
                  .checkbox
                    %label
                      = check_box_tag :genre
                      Genre

0 个答案:

没有答案