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 35
35:       def error_message
36:         object.errors[@method_name]
37:       end
error_wrapping(html_tag) click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 27
27:       def error_wrapping(html_tag)
28:         if object_has_errors?
29:           Base.field_error_proc.call(html_tag, self)
30:         else
31:           html_tag
32:         end
33:       end
object() click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 12
12:       def object
13:         @active_model_object ||= begin
14:           object = super
15:           object.respond_to?(:to_model) ? object.to_model : object
16:         end
17:       end
tag(type, options, *) click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 23
23:       def tag(type, options, *)
24:         tag_generate_errors?(options) ? error_wrapping(super) : super
25:       end

Private Instance Methods

object_has_errors?() click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 41
41:       def object_has_errors?
42:         object.respond_to?(:errors) && object.errors.respond_to?(:full_messages) && error_message.any?
43:       end
tag_generate_errors?(options) click to toggle source
    # File lib/action_view/helpers/active_model_helper.rb, line 45
45:       def tag_generate_errors?(options)
46:         options['type'] != 'hidden'
47:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.