Skip to content

Instantly share code, notes, and snippets.

@brian428
Created August 19, 2012 18:59
Show Gist options
  • Save brian428/3397059 to your computer and use it in GitHub Desktop.
Save brian428/3397059 to your computer and use it in GitHub Desktop.
TodoStore.coffee
Ext.define( "ExtCoffeeTodo.store.TodoStore",
extend: "Ext.data.Store"
requires: [ "ExtCoffeeTodo.model.Todo" ]
# Store interacts with remote API
constructor: ->
config =
autoLoad: true
model: "ExtCoffeeTodo.model.Todo"
proxy:
type: "ajax"
api:
create : "todo/ajaxCreate",
read : "todo/ajaxList",
update : "todo/ajaxSave",
reader:
type: "json"
sorters: [
property: "dateCreated"
direction: "DESC"
]
filters: [ @completedFilter ]
@callParent( [ config ] )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment