module Dart::NamingConventions::DirectAssociationHelpers
Public Instance Methods
conventional_foreign_key?()
click to toggle source
Returns true if this association has a conventionally named foreign key based on the parent table name
# File lib/dart/naming_conventions/direct_association_helpers.rb, line 16 def conventional_foreign_key? parent_table == naming_conventions.parent_table_for(foreign_key) end
conventional_parent?(table_name)
click to toggle source
Returns true if this association has a conventional foreign key pointing to the given table_name
# File lib/dart/naming_conventions/direct_association_helpers.rb, line 6 def conventional_parent?(table_name) parent_table == table_name && conventional_foreign_key? end
conventional_primary_key?()
click to toggle source
Returns true if this association has a conventional primary key on the parent table
# File lib/dart/naming_conventions/direct_association_helpers.rb, line 11 def conventional_primary_key? primary_key == naming_conventions.conventional_primary_key end