Hello to everyone who is interested in my question.
I am glad to say that I myself created the solution. But I have a few comments. )))
First, the solution:
class ApplicationController < ActionController::Base
...
...
after_filter :restore_int_value, :only => [:create, :update]
...
...
private
...
...
def restore_int_value
response.body = response.body.gsub(/(numeric.*<input id=")([^_]*)(_)([^"]*)(.*value=")(\d+)(")/){$1 + $2 + $3 + $4 + $5 + params[$2][$4] + $7}
end
...
...
end
Secondly, the comments:
1) The solution runs along gems such as Formtastic and Simple_form. These gems build forms unwound in a detailed html and enable us to use a regular expression. If you don’t use such gems, you can simply wrap all your integer attributes, for example, in the 'p' tag with the class 'numeric', as shown below, and I think my solution will work for this too:
<p class="numeric"> <%= text_field(:human, :age) %> </p>
2) , . ( "Handle Multiple Models in One Form" "Advanced Rails Recipes" ).
, , JavaScript. , , JavaScript. JavaScript ( ). .;)
JavaScript, , ( , ). , .;)
, , , -, .;)