Module: ActionView::Helpers::Tags::Checkable

Included in:
CheckBox, RadioButton
Defined in:
actionview/lib/action_view/helpers/tags/checkable.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#input_checked?(options) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
13
14
# File 'actionview/lib/action_view/helpers/tags/checkable.rb', line 7

def input_checked?(options)
  if options.has_key?("checked")
    checked = options.delete "checked"
    checked == true || checked == "checked"
  else
    checked?(value)
  end
end