couch_potato-rails2 0.5.8 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,18 +1,14 @@
|
|
1
|
-
require 'active_support/concern'
|
2
|
-
require 'active_model/callbacks'
|
3
|
-
|
4
1
|
module CouchPotato
|
5
2
|
module Persistence
|
6
3
|
module Callbacks
|
7
4
|
def self.included(base) #:nodoc:
|
8
|
-
base.extend ActiveModel::Callbacks
|
9
5
|
|
10
6
|
base.class_eval do
|
11
7
|
attr_accessor :skip_callbacks
|
12
8
|
|
13
9
|
define_model_callbacks :create, :save, :update, :destroy
|
14
10
|
define_model_callbacks *[:save, :create, :update].map {|c| :"validation_on_#{c}"}
|
15
|
-
define_model_callbacks :validation
|
11
|
+
define_model_callbacks :validation
|
16
12
|
end
|
17
13
|
end
|
18
14
|
|
data/lib/couch_potato/version.rb
CHANGED