Sha256: 115880ccfc11a77a27271d84b3ffe39d28e5bdddcfce319f7258824f0b9668d1

Contents?: true

Size: 242 Bytes

Versions: 7

Compression:

Stored size: 242 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"] || "##{id}")
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
beautiful_scaffold-2.0.0 lib/generators/templates/app/models/concerns/caption_concern.rb
beautiful_scaffold-2.0.0.pre lib/generators/templates/app/models/concerns/caption_concern.rb
beautiful_scaffold-1.0.2 lib/generators/templates/app/models/concerns/caption_concern.rb
beautiful_scaffold-1.0.1 lib/generators/templates/app/models/concerns/caption_concern.rb
beautiful_scaffold-1.0.0.pre lib/generators/templates/app/models/concerns/caption_concern.rb
beautiful_scaffold-0.3.6 lib/generators/templates/app/models/concerns/caption_concern.rb
beautiful_scaffold-0.3.5 lib/generators/templates/app/models/concerns/caption_concern.rb