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