如何制作一个复选框? [英] How to make a check box?
本文介绍了如何制作一个复选框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好我是Ruby on Rails的新手,我想知道如何在Ruby on Rails应用程序中创建复选框或 link_for ,这将更改名为admin的属性的值
Hello. I am totally new to Ruby on Rails and I want to know how to make a checkbox or link_for in a Ruby on Rails application that will change the value of an attribute called admin in a table called users from false to true , to make the normal user an admin.
注意:我正在使用 form_for 创建表单
NOTE : I am using form_for in creating forms
推荐答案
您可能需要阅读,它说明了如何创建表格: http://guides.rubyonrails.org/form_helpers.html
You may want to read, it explains how to create forms: http://guides.rubyonrails.org/form_helpers.html
这篇关于如何制作一个复选框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文