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的...