Skip to content

Instantly share code, notes, and snippets.

@creich
Created June 22, 2012 16:49
Show Gist options
  • Save creich/2973937 to your computer and use it in GitHub Desktop.
Save creich/2973937 to your computer and use it in GitHub Desktop.
<%= form_for @time_tracker, :url => {:action => :stop},
:html => {:class => "time-tracker-form",
:onchange => "<my-suoer-prototype-request>",
#:update => {:success => :nothing, :failure => "time-tracker-control"},
:url => {:controller => :time_trackers, :action => "update", :format => :json},
:method => :put,
:with => " Form.serializeElements( $(this).getInputs() ) ")} do |f| %>
<!-- TODO localize placeholders / add labels -->
<%= f.label l(:time_tracker_label_current_task) %>
<%= form_for @time_tracker, :url => {:action => :stop},
:html => {:class => "time-tracker-form",
:onchange => remote_function(
:complete => "function(response) { alert('response.responseJson') }",
#:update => {:success => :nothing, :failure => "time-tracker-control"},
:url => {:controller => :time_trackers, :action => "update", :format => :json},
:method => :put,
:with => " Form.serializeElements( $(this).getInputs() ) ")} do |f| %>
<!-- TODO localize placeholders / add labels -->
<%= f.label l(:time_tracker_label_current_task) %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment