ActionView::Template::Error (undefined local variable or method `f'
for #<#<Class:....
controller
def change_price
new_price = ....
@tax_amount = new_price * I18n.t(:standard_tax_rate)
render 'backoffice/projects/change_price.js'
end
change_tax.js.erb
....
$('#project_tax').html( '<%= escape_javascript(render :partial =>
"backoffice/projects/project_tax", :locals => {:f => f}) %>');
and in my partial view
= f.text_field :tax_amount, :readonly => true, :precision =>
2, :delimiter => ".", :value => @tax_amount
is there a way to do it , or should I use simple text_field tag in
the partial ?
thanks for feedback
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.