0
用戶可以編輯自己的帳戶,並有一個菜單來選擇他的社區:Rails 3的切換菜單重新加載頁面時更改數據
<%= form_for @user, :html => { :multipart => true } do |f| %>
<%= f.collection_select :community_id, Community.find(:all,
:include => :memberships,
:conditions => ['memberships.user_id = ? and memberships.role > ?', @user.id, '0' ]),
:id,
:name,
:style => "width: 200px;" %>
<% end %>
我希望把節目頁面上此菜單,給他的可能性直接切換。
隨着軌道2,我用的observe_field或:平變化=> 'this.form.onsubmit()',我不知道java的...