Commit 11795faf9617c570656843084ab9e10caac212d7
1 parent
4f42e7d2
Exists in
colab
and in
4 other branches
Removes unnecessary conversion from KalibroRangesController params
Showing
1 changed file
with
0 additions
and
6 deletions
Show diff stats
app/controllers/kalibro_ranges_controller.rb
... | ... | @@ -46,7 +46,6 @@ class KalibroRangesController < ApplicationController |
46 | 46 | private |
47 | 47 | |
48 | 48 | def kalibro_range_params |
49 | - params[:kalibro_range][:beginning] = params[:kalibro_range][:beginning].to_f.to_s if numeric?(params[:kalibro_range][:beginning]) # this is necessary for the beginning validator | |
50 | 49 | params[:kalibro_range] |
51 | 50 | end |
52 | 51 | |
... | ... | @@ -87,11 +86,6 @@ class KalibroRangesController < ApplicationController |
87 | 86 | @metric_configuration_id = params[:metric_configuration_id].to_i |
88 | 87 | end |
89 | 88 | |
90 | - # used on kalibro_range_params | |
91 | - def numeric?(text) | |
92 | - Float(text) != nil rescue false | |
93 | - end | |
94 | - | |
95 | 89 | def set_kalibro_range |
96 | 90 | @kalibro_range = KalibroRange.find(params[:id].to_i) |
97 | 91 | end | ... | ... |