Sha256: 2fe239a5219ab746f8cf1ba80a7f73942fa5ca8e4a2fa0633a0094c2b3f49622

Contents?: true

Size: 338 Bytes

Versions: 2

Compression:

Stored size: 338 Bytes

Contents

# SurveyGizmo has a bad habit of returning titles in different formats when one is requesting via .all vs .first
module SurveyGizmo
  module MultilingualTitle
    extend ActiveSupport::Concern

    included do
      attribute :title, Hash
    end

    def title=(val)
      super(val.is_a?(Hash) ? val['English'] : val)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
survey-gizmo-ruby-6.5.0 lib/survey_gizmo/multilingual_title.rb
survey-gizmo-ruby-6.4.1 lib/survey_gizmo/multilingual_title.rb