:remote => true
form_for タグがあり、ユーザーのステータスに応じてそのオプションを有効にしたい
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
前もって感謝します