We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regarding https://github.com/ahe/2dc_jqgrid/blob/master/lib/2dc_jqgrid.rb#L64
[tk@Na14-38 apollo]$ cat 1.rb options = { #:multi_selection => false :multi_selection => nil } p options
options = options.inject({}) do |opt, (key, value)| opt[key] = value.to_s opt end p options
if options[:multi_selection] p "options:multi_selection matches TRUE" else p "options:multi_selection matches FALSE" end
[tk@Na14-38 apollo]$ ruby -v 1.rb ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux] {:multi_selection=>nil} {:multi_selection=>""} "options:multi_selection matches TRUE" #<= ????
[tk@Na14-38 apollo]$ ruby -v 1.rb ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux] {:multi_selection=>false} {:multi_selection=>"false"} "options:multi_selection matches TRUE" #<== ???
The text was updated successfully, but these errors were encountered:
No branches or pull requests
regarding https://github.com/ahe/2dc_jqgrid/blob/master/lib/2dc_jqgrid.rb#L64
[tk@Na14-38 apollo]$ cat 1.rb
options =
{
#:multi_selection => false
:multi_selection => nil
}
p options
Stringify options values
options = options.inject({}) do |opt, (key, value)|
opt[key] = value.to_s
opt
end
p options
if options[:multi_selection]
p "options:multi_selection matches TRUE"
else
p "options:multi_selection matches FALSE"
end
[tk@Na14-38 apollo]$ ruby -v 1.rb
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
{:multi_selection=>nil}
{:multi_selection=>""}
"options:multi_selection matches TRUE" #<= ????
[tk@Na14-38 apollo]$ ruby -v 1.rb
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
{:multi_selection=>false}
{:multi_selection=>"false"}
"options:multi_selection matches TRUE" #<== ???
The text was updated successfully, but these errors were encountered: