From 320dfbecdf345b877903253679e7311a64eaf3c0 Mon Sep 17 00:00:00 2001 From: hjust Date: Sun, 18 Oct 2009 13:59:43 +0000 Subject: [PATCH] fixed faulty input name use common clean_currency method git-svn-id: https://dev.finn.de/svn/cockpit/trunk@203 7926756e-e54e-46e6-9721-ed318f58905e --- app/controllers/costlog_controller.rb | 2 +- app/views/costlog/edit.rhtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/costlog_controller.rb b/app/controllers/costlog_controller.rb index 26bb4d4578..2f8b07d86c 100644 --- a/app/controllers/costlog_controller.rb +++ b/app/controllers/costlog_controller.rb @@ -93,7 +93,7 @@ class CostlogController < ApplicationController end if params[:cost_entry].is_a?(Hash) - params[:cost_entry][:overridden_costs] = clean_currency(params[:cost_entry][:overridden_costs]) + params[:cost_entry][:overridden_costs] = CostRate.clean_currency(params[:cost_entry][:overridden_costs]) end @cost_entry.attributes = params[:cost_entry] @cost_entry.cost_type ||= CostType.default diff --git a/app/views/costlog/edit.rhtml b/app/views/costlog/edit.rhtml index 6b21ff09fb..e7b8149d09 100644 --- a/app/views/costlog/edit.rhtml +++ b/app/views/costlog/edit.rhtml @@ -25,7 +25,7 @@ <%= number_to_currency(@cost_entry.calculated_costs) %> <%= update_page_tag do |page| - page << "makeEditable('cost_entry_costs', 'cost_entry[costs]');" + page << "makeEditable('cost_entry_costs', 'cost_entry[overridden_costs]');" page << "edit($('cost_entry_costs'), 'cost_entry[overridden_costs]', '#{number_to_currency(@cost_entry.overridden_costs)}');" if @cost_entry.overridden_costs end %> <% else %>