I am trying to capture the identity of a gallery
so that I can create a form based around that particular gallery.
So I put together a select form, and threw an attr_accessor in my controller.
But its failing from all sorts of directions, and I figure its a problem with my syntax. Any whiz's know this?
model
attr_accessor :existing_gal
controller
def new
@gallery = Gallery.new
@galleries = @organization.galleries
end
view
- form_for @gallery do |f|
= select @gallery, @existing_gal, options_for_select(@galleries.collect { |g| g.name }), {}, :class => "gallery_title"
= link_to 'add photos', new_photos_organization_media_gallery_url(@organization.id, @existing_gal.id), :class => 'button add_photos_btn'