RubyGems.org

protective

0.1.0

Protect records from being destroyed in a declarative way. Simply add 'protect_if :dont_delete, "Record is marked as not deletable"' to your ActiveRecord model. Your record will no be destroyed and the given message is added to the errors object.

installgem install protective
Authors

Pascal Zumkehr

1,402 total downloads 1,402 for this version
Owners

319fd052917295138ff2249b60f81540

Gemfile
gem 'protective', '~> 0.1.0'
Versions
  1. 0.1.0 February 6, 2011 (7 KB)