Skip to content

Instantly share code, notes, and snippets.

Created May 10, 2013 17:14
Show Gist options
  • Save anonymous/a056ac364c395e263bf9 to your computer and use it in GitHub Desktop.
Save anonymous/a056ac364c395e263bf9 to your computer and use it in GitHub Desktop.
Why no work?
options = {"lastpatient"=>":ID"}
for option in options
#this works
puts selected[:ID]
#this does not work
puts selected['#{option}']
#and this does not work
puts selected[:option]
end
@canton7
Copy link

canton7 commented May 10, 2013

options = {"lastpatient" => "ID"}

options.each do |key, value|
  puts key
  puts value
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment