Html 视图中的布尔值
我很难在视图中显示布尔值的结果Html 视图中的布尔值,html,ruby-on-rails,view,internationalization,boolean,Html,Ruby On Rails,View,Internationalization,Boolean,我很难在视图中显示布尔值的结果 我想显示启用和禁用,但显示true或false 我在index.html.slim中的代码 th Active? td = plan.enable p strong Active ?: = @plan.enable show.html.slim中的我的代码 th Active? td = plan.enable p strong Active ?:
我想显示启用和禁用,但显示true或false 我在index.html.slim中的代码
th Active?
td = plan.enable
p
strong Active ?:
= @plan.enable
show.html.slim中的我的代码
th Active?
td = plan.enable
p
strong Active ?:
= @plan.enable
我怎样才能解决这个问题呢?你应该研究三元数 在你看来,你可以这样做