Sha256: d05ca167aa1ab7bac7341644d765ff9569f6011510c3d7762fdfb3ef57a0177b

Contents?: true

Size: 259 Bytes

Versions: 3

Compression:

Stored size: 259 Bytes

Contents

module CaptionConcern
  extend ActiveSupport::Concern

  # You can OVERRIDE this method used in model form and search form (in belongs_to relation)
  def caption
    (self["name"] || self["label"] || self["description"] || self["email"] || "##{id}")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
beautiful_scaffold-2.0.3 lib/generators/templates/app/models/concerns/caption_concern.rb
beautiful_scaffold-2.0.2 lib/generators/templates/app/models/concerns/caption_concern.rb
beautiful_scaffold-2.0.1 lib/generators/templates/app/models/concerns/caption_concern.rb