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



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

def clear_reflections_cache
  @__reflections = nil
end

#dangerous_attribute_method?(_name) ⇒ Boolean

override

Returns:

  • (Boolean)


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

def dangerous_attribute_method?(_name)
  false
end

#default_scopesObject



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

def default_scopes
  []
end

#generated_association_methodsObject Also known as: generated_feature_methods



10
11
12
13
14
15
16
# 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



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

def pluralize_table_names
  to_s.pluralize
end