Class Index [+]

Quicksearch

ActionView::Helpers::ActiveModelInstanceTag

Public Instance Methods

error_message() click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 55
55:       def error_message
56:         object.errors[@method_name]
57:       end
error_wrapping(html_tag) click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 47
47:       def error_wrapping(html_tag)
48:         if object_has_errors?
49:           Base.field_error_proc.call(html_tag, self)
50:         else
51:           html_tag
52:         end
53:       end
object() click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 32
32:       def object
33:         @active_model_object ||= begin
34:           object = super
35:           object.respond_to?(:to_model) ? object.to_model : object
36:         end
37:       end
tag(type, options, *) click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 43
43:       def tag(type, options, *)
44:         tag_generate_errors?(options) ? error_wrapping(super) : super
45:       end

Private Instance Methods

object_has_errors?() click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 61
61:       def object_has_errors?
62:         object.respond_to?(:errors) && object.errors.respond_to?(:full_messages) && error_message.any?
63:       end
tag_generate_errors?(options) click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 65
65:       def tag_generate_errors?(options)
66:         options['type'] != 'hidden'
67:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.