Class: Avatar
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Avatar
- Defined in:
- app/models/polymorphic/avatar.rb
Overview
Schema Information
Table name: avatars
id :integer not null, primary key
user_id :integer
entity_id :integer
entity_type :string(255)
image_file_size :integer
image_file_name :string(255)
image_content_type :string(255)
created_at :datetime
updated_at :datetime
Constant Summary collapse
- STYLES =
{ :large => "75x75#", :medium => "50x50#", :small => "25x25#", :thumb => "16x16#" }.freeze
Class Method Summary collapse
-
.styles ⇒ Object
Invert STYLES hash removing trailing #.
Class Method Details
.styles ⇒ Object
Invert STYLES hash removing trailing #.
54 55 56 |
# File 'app/models/polymorphic/avatar.rb', line 54 def self.styles Hash[STYLES.map{ |key, value| [ value[0..-2], key ] }] end |