<%= form_for @photo_gallery, :url => path, :html => {:class => 'form-horizontal', :id => 'spud_admin_photo_gallery_form'} do |f| %> <%= error_messages_for(f.object) %>
Gallery Info
<%= f.label :title, :class => "control-label" %>
<%= f.text_field :title %>
<%= hidden_field_tag 'spud_photo_gallery[album_ids][]' %>
Select Albums

Selected:

<%= render :partial => '/admin/photo_albums/album', :collection => @photo_gallery.albums %>

Available:

<%= render :partial => '/admin/photo_albums/album', :collection => @photo_gallery.albums_available %>
<%= f.submit "Save Photo Gallery", :class=>"btn btn-primary form-btn", "data-loading-text" => "Saving..." %> or <%= link_to "cancel", request.referer, :class => "btn" %>
<% end %>