Sha256: 312f277f2186c2a5d3b6a9a23f3b742693743049f10fb5e0c204018c965eb749
Contents?: true
Size: 508 Bytes
Versions: 12
Compression:
Stored size: 508 Bytes
Contents
class OperationDecorator < ApplicationDecorator # TODO: cleanup after manual migration of user data to operations def past_tense object.type.humanize + (object.type[-1] == 'e' ? 'd' : 'ed') end def creator_gravatar return nil if object.user.nil? && object.user_email.nil? email = object.user_email || object.user.email h.gravatar_url(email, 32) end def creator_name return nil if object.user.nil? && object.user_name.nil? object.user_name || object.user.name end end
Version data entries
12 entries across 12 versions & 1 rubygems