Notes posted by lakesare
RSS feed
0 thanks
link broken
http://apidock.com/rails/ActionDispatch/Request/body <- request body link

1 thank
What object_name.method values will result in checked chekboxes.
*It’s intended that method returns an integer and if that integer is above zero, then the checkbox is checked.* - more exactly, that’s how it’s determined whether value will be checked or not:
(`@checked_value` is checked_value, `value` is what object_name.method returns)
def checked?(value) case value when TrueClass, FalseClass value == !!@checked_value when NilClass false when String value == @checked_value else if value.respond_to?(:include?) value.include?(@checked_value) else value.to_i == @checked_value.to_i end end end