Sha256: 873816c67be333de4852c7852f2c19da6a55a8e634c29fb79667accb75b77468
Contents?: true
Size: 406 Bytes
Versions: 21
Compression:
Stored size: 406 Bytes
Contents
# frozen_string_literal: true # lib/plutonium/resource/associations.rb module Plutonium module Resource module Record module Labeling def to_label %i[name title].each do |method| name = send(method) if respond_to?(method) return name if name.present? end "#{model_name.human} ##{to_param}" end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems