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.
|
Rev | Line | |
---|
[1] | 1 | class Gallery < ActiveRecord::Base |
---|
| 2 | has_many :gallery_files |
---|
| 3 | has_many :gallery_medias |
---|
| 4 | |
---|
| 5 | belongs_to :artwork |
---|
| 6 | belongs_to :engineering |
---|
[4] | 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 |
---|
[1] | 15 | end |
---|