Class: Photo
- Inherits:
-
Object
- Object
- Photo
- Includes:
- Ish::Utils, Mongoid::Document, Mongoid::Paperclip, Mongoid::Timestamps
- Defined in:
- lib/photo.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Ish::Utils
Class Method Details
.n_per_manager_gallery ⇒ Object
57 58 59 |
# File 'lib/photo.rb', line 57 def self.n_per_manager_gallery 25 end |
Instance Method Details
#export_fields ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/photo.rb', line 61 def export_fields %w| gallery_id name descr weight is_public is_trash photo_file_name photo_content_type photo_file_size photo_updated_at photo_fingerprint | end |
#name ⇒ Object
24 25 26 27 28 |
# File 'lib/photo.rb', line 24 def name return self[:name] if self[:name] update_attribute(:name, self.photo.to_s.split('/').last.split('?').first) name end |
#user ⇒ Object
12 13 14 |
# File 'lib/photo.rb', line 12 def user user_profile end |