Module: Reorm::PrimaryKeyedClassMethods
- Defined in:
- lib/reorm/modules/database_modules.rb
Instance Method Summary collapse
Instance Method Details
#primary_key(field = nil) ⇒ Object
21 22 23 24 |
# File 'lib/reorm/modules/database_modules.rb', line 21 def primary_key(field=nil) table_settings[:primary_key] = field if !field.nil? table_settings[:primary_key] end |
#table_name(name = nil) ⇒ Object
26 27 28 29 |
# File 'lib/reorm/modules/database_modules.rb', line 26 def table_name(name=nil) table_settings[:table_name] = name if !name.nil? table_settings[:table_name] end |