<% if @admin_action %>
  <%= f.text_field :quantity_asked, :size => 3, :onblur =>
    "jQuery.post('#{url_for(:controller => :distribution_plugin_ordered_product, :action => :admin_edit, :id => product)}',
                 { 'ordered_product[quantity_asked]': jQuery(this).val().replace(',','.') });" %>
<% else %>
  <%= f.text_field :quantity_asked, :size => 3, :onblur =>
    "jQuery.post('#{url_for(:controller => :distribution_plugin_ordered_product, :action => :edit, :id => product)}',
                 { 'ordered_product[quantity_asked]': jQuery(this).val().replace(',','.') });" %>
<% end %>
<span class="lower"><%= product.product.unit.singular %></span>

<%= f.text_field :quantity_asked, :size => 3, :onblur =>
"jQuery.post('#{url_for(:controller => :distribution_plugin_ordered_product, :action => :edit, :id => product)}',
                 { 'ordered_product[quantity_asked]': jQuery(this).val().replace(',','.') });" %>
<span class="lower"><%= product.product.unit.singular %></span>

Fix security issue. Defined admin action in the view. Passed to controller
Fix security issue. Defined admin action in the view. Passed to
controller
