Skip to content

Instantly share code, notes, and snippets.

Created March 17, 2015 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1d3814bd45fc1a6fc56a to your computer and use it in GitHub Desktop.
Save anonymous/1d3814bd45fc1a6fc56a to your computer and use it in GitHub Desktop.
ember.js - getting all form values
{{input type="text" value=username label="username"}}
{{input type="password" value=password label="password"}}
App.SignInRoute = Ember.Route.extend
actions:
authenticate: ->
@get('adapter').login(@get 'currentUser')
.then =>
@transitionTo 'index'
.then null, =>
@set 'currentUser.error', 'Invalid username or password'
model: ->
@get 'currentUser'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment