Module: DataMapper::ExtJS

Defined in:
lib/dm-extjs.rb,
lib/dm-extjs/model.rb,
lib/dm-extjs/resource.rb,
lib/dm-extjs/collection.rb

Defined Under Namespace

Modules: Collection, Model, Resource

Constant Summary collapse

EXT_SORT_PARAM =
'order'
EXT_LIMIT_PARAM =
'limit'
EXT_OFFSET_PARAM =
'start'
EXT_DIRECTION_PARAM =
'_dir'
EXT_META =
{
  :root =>              'results',
  :successProperty =>   'success',
  :messageProperty =>   'message',
  :totalProperty =>     'total'
}
DM_PARAM_TRANSLATIONS =
{
  EXT_SORT_PARAM =>   :order,
  EXT_LIMIT_PARAM =>  :limit,
  EXT_OFFSET_PARAM => :offset
}
EXT_TYPE_TRANSLATIONS =
{
  'String' =>     {:type => 'string'},
  'Integer' =>    {:type => 'int'},
  'Fixnum' =>     {:type => 'int'},
  'Float' =>      {:type => 'float'},
  'TrueClass' =>  {:type => 'boolean'},
  'FalseClass' => {:type => 'boolean'},
  'Date' =>       {:type => 'date', :dateFormat => 'Y-m-d'},
  'DateTime' =>   {:type => 'date', :dateFormat => 'c'}
}