Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/gimme_a_break.rb
Overview
Reopening ActiveRecord::Base not bad, see http://yehudakatz.com/2009/11/12/better-ruby-idioms/
Class Method Summary collapse
Class Method Details
.gimme_a_break(options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gimme_a_break.rb', line 21 def self.gimme_a_break( ={}) cattr_accessor :gimme_a_break_timeout self.gimme_a_break_timeout = ([:timeout] || 6) if Rails.env.production? include GimmeABreak class_eval " validate :gimme_a_break\n EOV\n end\nend\n" |