root/app/models/gallery.rb
@
15
| Revision 4, 318 bytes (checked in by falcon, 17 years ago) |
|---|
| Line | |
|---|---|
| 1 | class 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 |
| 15 | end |
Note: See TracBrowser
for help on using the browser.
