Skip to content

Instantly share code, notes, and snippets.

@saturnflyer
Created April 21, 2014 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saturnflyer/11144765 to your computer and use it in GitHub Desktop.
Save saturnflyer/11144765 to your computer and use it in GitHub Desktop.
mod = Module.new
mod.module_eval %{
def fill_out_#{name}(value)
checkbox = find(:#{name})
if (#{name}_checked_values.include?(value) && !checkbox.selected?) ||
(#{name}_unchecked_values.include?(value) && checkbox.selected?)
checkbox.click
end
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment