This project is archived and is in readonly mode.
field_error_proc 'error_message undefined method' in rails 3.pre
-
ieuser
it works but outputs safe html instead of the raw version
ActionView::Base.field_error_proc = Proc.new { |html_tag, instance|
"try to add raw and it doesnt like it..
-
Cam Caine
- Tag set to actionview
I think if you try adding .html_safe on the string output it works, but I am more concerned with getting what was instance.error_message but now errors.on is [] I dont see how to get it?
-
YoNoSoyTu
I have the same problem:
undefined method
error_message' for #<ActionView::Helpers::InstanceTag:0x40be40c>Looking at the code (both Rails-3.0.0.beta and Edge in GitHub) at the bottom of active_model_helper.rb (http://github.com/rails/rails/blob/master/actionpack/lib/action_vie...) you can see that ActiveRecordInstanceTag has not that method defined.
I have prepared a patch which fixes the omission and includes a test.
-
Repository
- State changed from new to resolved
(from [334983eca042b5016d3d79d7ed5761b60ba871ed]) Recovers error_messages for ActiveRecordInstanceTag. [#4078 field_error_proc 'error_message undefined method' in rails 3.pre state:resolved]
Signed-off-by: wycats wycats@gmail.com
http://github.com/rails/rails/commit/334983eca042b5016d3d79d7ed5761...
