Sha256: df6f1704747df75fe342d499ec0e1af0593643c48f5c0c82d48b2cdc4dbdba02

Contents?: true

Size: 361 Bytes

Versions: 7

Compression:

Stored size: 361 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[SurveyGizmo.configuration.locale] : val)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
survey-gizmo-ruby-8.0.0 lib/survey_gizmo/multilingual_title.rb
survey-gizmo-ruby-7.1.1 lib/survey_gizmo/multilingual_title.rb
survey-gizmo-ruby-7.1.0 lib/survey_gizmo/multilingual_title.rb
survey-gizmo-ruby-7.0.0 lib/survey_gizmo/multilingual_title.rb
survey-gizmo-ruby-6.7.0 lib/survey_gizmo/multilingual_title.rb
survey-gizmo-ruby-6.6.0 lib/survey_gizmo/multilingual_title.rb
survey-gizmo-ruby-6.5.1 lib/survey_gizmo/multilingual_title.rb