Sha256: 14b7940e3a3942da6b2ecb34831e2c73d58568f5262bac50bd4ba71cd813c611

Contents?: true

Size: 836 Bytes

Versions: 15

Compression:

Stored size: 836 Bytes

Contents

require 'tengine/core'

require 'selectable_attr'

module Tengine::Core::SelectableAttr
  extend ActiveSupport::Concern

  included do
    include ::SelectableAttr::Base

    class << self
      def selectable_attr_with_i18n_scope(attr_name, *args, &block)
        enum = selectable_attr_without_i18n_scope(attr_name, *args, &block)
        enum.i18n_scope('selectable_attrs', self.name.underscore, attr_name.to_s)
        enum
      end
      alias_method_chain :selectable_attr, :i18n_scope

      def multi_selectable_attr_with_i18n_scope(attr_name, *args, &block)
        enum = multi_selectable_attr_without_i18n_scope(attr_name, *args, &block)
        enum.i18n_scope('selectable_attrs', self.name.underscore, attr_name.to_s)
        enum
      end
      alias_method_chain :multi_selectable_attr, :i18n_scope
    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tengine_core-1.2.2 lib/tengine/core/selectable_attr.rb
tengine_core-1.2.1 lib/tengine/core/selectable_attr.rb
tengine_core-1.2.0 lib/tengine/core/selectable_attr.rb
tengine_core-1.1.0 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.39 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.38 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.37 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.36 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.35 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.34 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.33 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.32 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.31 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.30 lib/tengine/core/selectable_attr.rb
tengine_core-0.5.28 lib/tengine/core/selectable_attr.rb