Skip to content

Instantly share code, notes, and snippets.

@mttdffy
mttdffy / keybase.md
Created May 22, 2015 20:31
Keybase Proof

Keybase proof

I hereby claim:

  • I am mttdffy on github.
  • I am mttdffy (https://keybase.io/mttdffy) on keybase.
  • I have a public key whose fingerprint is 52CB A0A1 FE1C 60C2 9B0F A1DC 8D33 0C91 5D1B 31A2

To claim this, I am signing this object:

@mttdffy
mttdffy / unvalidate.rb
Last active November 17, 2017 19:59
RoR/Mongoid module for removing validations from a model
module Mongoid
module Unvalidate
extend ActiveSupport::Concern
module ClassMethods
# Removes specified validations from existing models for a given field
#
# @param [Symbol] field the field to remove validations from
# @param [Array<Symbol> | Symbol] validations validations to remove from field

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

@mttdffy
mttdffy / jquery_ui.rb
Last active April 24, 2017 13:18
Capybara / Poltergeist helpers for JQuery UI
module JSHelpers
module JQueryUI
# type inside an autocomplete field and pick a value.
#
# @param [String] field selector of the autocomplete field
# @param [Hash] options details about what to search and what to select
# @param options [String] :with the text to type in the autocomplete field
# @param options [String] :select the text value of the autocomplete resuilt you
# want to pick. If this option is not present, the first result will be picked.