root/app/models/gallery.rb~ @ 7

Revision 4, 318 bytes (checked in by falcon, 17 years ago)

75% complete. ajax support for engineering and galleries. galleries add/edit. artwork and engineering layouts.

Line 
1class Gallery < ActiveRecord::Base
2        has_many :gallery_files
3        has_many :gallery_medias
4
5        belongs_to :artwork
6        belongs_to :engineering
7       
8        def title_fields_update=(title_fields)
9                title_fields.each do |id, title|
10                        if (GalleryMedia.exists?(id))
11                                GalleryMedia.find(id).update_attributes(title)
12                        end
13                end
14        end
15end
Note: See TracBrowser for help on using the browser.