engine/app/assets/javascripts/locomotive/views/snippets/new_view.js.coffee

8 lines
263 B
CoffeeScript
Raw Normal View History

2011-12-05 10:31:34 +00:00
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')