root/app/models/gallery.rb @ 15

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 media_fields_update=(media_fields)
9                media_fields.each do |id, media|
10                        if (GalleryMedia.exists?(id))
11                                GalleryMedia.find(id).update_attributes(media)
12                        end 
13                end
14        end
15end
Note: See TracBrowser for help on using the browser.