| OLD | NEW |
|---|---|
| 1 class Photo < ActiveRecord::Base | 1 class Photo < ActiveRecord::Base |
| 2 acts_as_taggable | 2 acts_as_taggable |
| 3 acts_as_audited | 3 acts_as_audited |
| 4 | 4 |
| 5 belongs_to :news_item | 5 belongs_to :news_item |
| 6 | 6 |
| 7 file_column :image, :magick => { | 7 file_column :image, :magick => { |
| 8 :geometry => "512x512", | 8 :geometry => "512x512", |
| 9 :versions => { "thumb" => "50x50", "fullsize" => "512x512"} | 9 :versions => { "thumb" => "50x50", "fullsize" => "512x512"} |
| 10 } | 10 } |
| 11 | 11 |
| 12 def self.family_photo | 12 def self.family_photo |
| 13 return nil if Setting[:family_photo_id].nil? | 13 return nil if Setting[:family_photo_id].nil? |
| 14 find Setting[:family_photo_id] | 14 Photo.find Setting[:family_photo_id] |
| 15 end | 15 end |
| 16 end | 16 end |
| OLD | NEW |