Module: EacRailsUtils::Models::TablelessAssociations::OverrideMethods::ClassMethods

Defined in:
lib/eac_rails_utils/models/tableless_associations/override_methods.rb

Instance Method Summary collapse

Instance Method Details

#clear_reflections_cacheObject



31
32
33
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 31

def clear_reflections_cache
  @__reflections = nil
end

#dangerous_attribute_method?(_name) ⇒ Boolean

override

Returns:

  • (Boolean)


22
23
24
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 22

def dangerous_attribute_method?(_name)
  false
end

#default_scopesObject



35
36
37
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 35

def default_scopes
  []
end

#generated_association_methodsObject Also known as: generated_feature_methods



10
11
12
13
14
15
16
17
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 10

def generated_association_methods
  @generated_association_methods ||= begin
    mod = const_set(:GeneratedAssociationMethods, Module.new)
    include mod

    mod
  end
end

#pluralize_table_namesObject

dummy table name



27
28
29
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 27

def pluralize_table_names
  to_s.pluralize
end