Re: [Rails] Simple UJS Fields

2011-04-18 Thread Julian Leviston
Do you mean Ajax, or UJS? UJS is unobtrusive JavaScript which means the JavaScript handling code is decorated on the HTML AFTER the page loads so that it doesn't make the HTML invalid and so that things like Braille readers still work with it. RJS on the other hand is Ajax where parts of the p

[Rails] Simple UJS Fields

2011-04-18 Thread Tom Ricks
Hello, I have the view: <% form_tag '/' do %> <%= number_field_tag(:number_one) %> <%= number_field_tag(:number_two) %> <%= submit_tag 'Calculate' %> <% end %> <%= @number %> and the controller: def add numberone = params[:number_one].to_f numbertwo = params[:number_two].to_f @numbe