Module: Avatari::Model
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/avatari/model.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#avatari_color ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/models/concerns/avatari/model.rb', line 6 def avatari_color if defined?(self.avatar_color) self.update_attributes(avatar_color: self.class.avatari_instance.colors.sample) if self.avatar_color.nil? self.avatar_color else self.class.avatari_instance.colors.sample end end |