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