Sha256: 5f563360fffde0e209491f10da91d48a161edff12632f6ad572731e977eb087e

Contents?: true

Size: 493 Bytes

Versions: 5

Compression:

Stored size: 493 Bytes

Contents

# -*- coding: utf-8 -*-
require 'copy_tuner_client/copyray'

begin
  require "simple_form"
rescue LoadError
end

if defined?(SimpleForm)
  module SimpleForm::Components::Labels
    protected
    def label_translation_with_copyray_comment
      source = label_translation_without_copyray_comment
      # どこのキーかは特定しにくい
      CopyTunerClient::Copyray.augment_template(source, attribute_name)
    end
    alias_method_chain :label_translation, :copyray_comment
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
copy_tuner_client-0.1.1.beta4 lib/copy_tuner_client/simple_form_extention.rb
copy_tuner_client-0.1.1.beta3 lib/copy_tuner_client/simple_form_extention.rb
copy_tuner_client-0.1.1.beta2 lib/copy_tuner_client/simple_form_extention.rb
copy_tuner_client-0.1.1.beta lib/copy_tuner_client/simple_form_extention.rb
copy_tuner_client-0.1.0.beta lib/copy_tuner_client/simple_form_extention.rb