A Rails plugin that let's you temporarily suppress ActiveRecord validations
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
rails
tasks
test
.gitignore
MIT-LICENSE
README
Rakefile
install.rb
suppress_validations.gemspec
uninstall.rb

README

SuppressValidations
===================

Allows you to temporarily disable validations for any ActiveRecord object,
mainly intended for use in script/console, though it might possibly be somewhat
usefull in unit tests as well.

Example
=======

class SomeModel < ActiveRecord::Base
  validates_presence_of :some_attribute
end



include SuppressValidations

some_model = SomeModel.new
some_model.save # -> false


suppress_validations do
    some_model.save # -> true
end


Copyright (c) 2009 Patrik Hedman, released under the MIT license