engine/app/assets/javascripts/locomotive/views/snippets/new_view.js.coffee
2011-12-05 02:31:34 -08:00

8 lines
263 B
CoffeeScript

Locomotive.Views.Snippets ||= {}
class Locomotive.Views.Snippets.NewView extends Locomotive.Views.Snippets.FormView
save: (event) ->
@save_in_ajax event,
on_success: (response, xhr) ->
window.location.href = xhr.getResponseHeader('location')