Sha256: a65f911a50e819e6a24b84797d11b5734fd8e8911e9149e00f54d9b8d256312d
Contents?: true
Size: 297 Bytes
Versions: 9
Compression:
Stored size: 297 Bytes
Contents
module Refinery class TranslatedFieldPresenter def initialize(record) @record = record end def call(field) record.send(field).presence || record.translations.detect {|t| t.send(field).present?}.send(field) end private attr_accessor :record end end
Version data entries
9 entries across 9 versions & 1 rubygems