aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/tags/checkable.rb
blob: c4a6fbb9465ac1a74336f4740fc8e70066b0130b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module ActionView
  module Helpers
    module Tags # :nodoc:
      module Checkable # :nodoc:
        def input_checked?(options)
          if options.has_key?("checked")
            checked = options.delete "checked"
            checked == true || checked == "checked"
          else
            checked?(value)
          end
        end
      end
    end
  end
end