]> source.dussan.org Git - redmine.git/commitdiff
Errors#get is deprecated in Rails 5.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 1 Jun 2017 21:30:39 +0000 (21:30 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 1 Jun 2017 21:30:39 +0000 (21:30 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16595 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/views/labelled_form_builder.rb

index 9ef41d0b4de063f5ec537b2585f9d4f4eb5086e7..07805c562da3b9ca9905eadd2d0b6ebc6c7bda90 100644 (file)
@@ -45,7 +45,7 @@ class Redmine::Views::LabelledFormBuilder < ActionView::Helpers::FormBuilder
   # A field for entering hours value
   def hours_field(field, options={})
     # 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))
     end
     text_field field, options