mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Errors#get is deprecated in Rails 5.
git-svn-id: http://svn.redmine.org/redmine/trunk@16595 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1adeaa7aa7
commit
4df797956d
@ -45,7 +45,7 @@ class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder
|
|||||||
# A field for entering hours value
|
# A field for entering hours value
|
||||||
def hours_field(field, options={})
|
def hours_field(field, options={})
|
||||||
# display the value before type cast when the entered value is not valid
|
# display the value before type cast when the entered value is not valid
|
||||||
if @object.errors.get(field).blank?
|
if @object.errors[field].blank?
|
||||||
options = options.merge(:value => format_hours(@object.send field))
|
options = options.merge(:value => format_hours(@object.send field))
|
||||||
end
|
end
|
||||||
text_field field, options
|
text_field field, options
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user