Skip to content

Instantly share code, notes, and snippets.

@dagda1
Created February 23, 2012 11:49
Show Gist options
  • Save dagda1/1892520 to your computer and use it in GitHub Desktop.
Save dagda1/1892520 to your computer and use it in GitHub Desktop.
statechart.coffee
Lead.Statechart = SC.Statechart.extend
monitorIsActive: false
subStatesAreConcurrent: YES
rootState: SC.State.extend
initialSubstate: 'notParsing'
notParsing: SC.State.extend
enterState: ->
exitState: ->
startParsing: (url_search)->
@gotoState('parsing', url_search)
parsing: SC.State.extend
enterState: (url_search) ->
Lead.parsing_controller.set('isParsing', true)
Lead.parsing_controller.start_parsing()
exitState: ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment