Module | ORMSupport
In: | lib/facets/more/ormsupport.rb

# ORMSupport

Provides a number of basc convenience methods for working with Object Relational Mapping.

### Methods

class_name classify classname default_key default_system foreign_key key_name keyname table_name tableize tablename

### Public Class methods

default_key(k="~".to_sym)
default_system(s="~".to_sym)

++

     class level

### Public Instance methods

class_name( sys=nil )

Alias for classname

classify( sys=:og )

Like classname, but returns the actual class.

classname( sys=nil )

Converts a table name into a class name.

foreign_key( key=nil )

Alias for keyname

key_name( key=nil )

Alias for keyname

keyname( key=nil )

This is good for generating database key/id field names from class names. In essense, it demodulizes, underscores and appends ‘id’.

table_name( sys=:og )

Alias for tablename

tableize( sys=:og )

Alias for tablename

tablename( sys=:og )

Converts a class-esque name into a table name.

[Validate]