Sha256: c86b928cb4585a8e979df8330bb7bba985b2567cd4a08c04beae52004a059405
Contents?: true
Size: 649 Bytes
Versions: 60
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true module Plutonium module Engine extend ActiveSupport::Concern class_methods do attr_reader :scoped_entity_class, :scoped_entity_strategy, :scoped_entity_param_key def scope_to_entity(entity_class, strategy: :path, param_key: nil) @scoped_entity_class = entity_class @scoped_entity_strategy = strategy @scoped_entity_param_key = param_key || entity_class.model_name.singular_route_key.to_sym end def scoped_to_entity? scoped_entity_class.present? end def dom_id module_parent_name.underscore.dasherize end end end end
Version data entries
60 entries across 60 versions & 1 rubygems