Module: DataMapper::ExtJS::Collection
- Included in:
- Collection
- Defined in:
- lib/dm-extjs/collection.rb
Instance Method Summary collapse
Instance Method Details
#to_extjs(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/dm-extjs/collection.rb', line 5 def to_extjs (={}) ret = { :metaData => model.([:methods]), :success => .has_key?(:success) ? [:success] : true, :message => .has_key?(:message) ? [:message] : '', :total => count, :results => self.to_json(.merge(:to_json => false)) } .fetch(:to_json, true) ? ret.to_json : ret end |