Module: DataMapper::Model

Defined in:
lib/dm-mysql/model.rb

Instance Method Summary collapse

Instance Method Details

#table_opts(options = {}) ⇒ Object

defines the table options for creating the resource in the database

Parameters:

  • Hash(Symbol (Hash(Symbol => String) options of a hash of available options)

    > String) options of a hash of available options

Raises:

  • (ArgumentError)


8
9
10
11
# File 'lib/dm-mysql/model.rb', line 8

def table_opts(options={})
  raise ArgumentError, "Table options needs to be a Hash!" if !options.is_a?(Hash)
  @table_options ||= options 
end