class WithModel::Model::DSL
Public Class Methods
Source
Public Instance Methods
Source
# File lib/with_model/model/dsl.rb, line 21 def model(&block) @model.model_block = block end
Provide a class body for the ActiveRecord
model.
Source
# File lib/with_model/model/dsl.rb, line 15 def table(options = {}, &block) @model.table_options = options @model.table_block = block end
Provide a schema definition for the table, passed to ActiveRecord’s ‘create_table`. The table name will be auto-generated.