Skip to content

Instantly share code, notes, and snippets.

View NaN1488's full-sized avatar

Nahuel Sciaratta NaN1488

View GitHub Profile
require 'rubygems'
require 'redis'
require 'redis/distributed'
r = Redis::Distributed.new %w[redis://host1:6379 redis://host2:6379]
# show node for key "foo"
p r.node_for("foo")
# set the value of "foo"
def chosen_select (element_id, option_number)
page.execute_script("$('##{element_id}').next('.chzn-container').trigger('mousedown')")
page.execute_script("$('##{element_id}_chzn_o_#{option_number}').trigger('mouseover').trigger('mouseup')")
end