Skip to content

Instantly share code, notes, and snippets.

View mcfearsome's full-sized avatar
💭
hacking the mainframe

mcfearsome mcfearsome

💭
hacking the mainframe
View GitHub Profile
@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
@insane-dreamer
insane-dreamer / rails1_to_rails2.rake
Created April 22, 2009 01:52
Rake task to check code for upgrading from rails 1 to 2.2
# upgrading from rails 1 to 2.2
# original script by technoweenie
# additions taken from other sources including:
# http://rubythis.blogspot.com/2006/12/ruby-on-rails-deprecations-part-2.html
# http://mentalized.net/journal/2007/03/13/rails_20_deprecations/
# http://www.slashdotdash.net/2007/12/03/rails-2-upgrade-notes/
# http://www.akuaku.org/archives/2008/04/upgrading_to_ra.shtml
# Does not include checks for Rails 2.3 changes.
namespace :rails2 do