我有一个 form_for 标签,我想:remote => true
根据用户状态启用它的选项
if the current user is not an admin I want the form to be :remote => true
if the current user is an admin I want the form to be a default form
这就是我想出的,它现在不起作用;(
<%= form_for @school, ((:remote => true) unless current_user.admin?) , :html => { :class => 'form-horizontal' } do |f| %>
有人能帮我吗
我上线了
ruby 1.9
Rails 3.2.x
提前致谢