module Dart::NamingConventions::ManyToOneAssociationHelpers

Public Instance Methods

conventional_name() click to toggle source

Returns the name of a referenced association according to the naming convention

@return [String] the name of the referenced association

# File lib/dart/naming_conventions/many_to_one_association_helpers.rb, line 11
def conventional_name
  naming_conventions.singular_association_name(foreign_key)
end
name_is_conventional?() click to toggle source
# File lib/dart/naming_conventions/many_to_one_association_helpers.rb, line 15
def name_is_conventional?
  naming_conventions.plural_association_name(foreign_key) == associated_table
end