sequel_simple_callbacks 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +13 -0
- data/VERSION +1 -1
- data/lib/sequel_simple_callbacks.rb +1 -1
- data/sequel_simple_callbacks.gemspec +1 -1
- data/test/models/conditional.rb +1 -1
- data/test/models/example.rb +2 -2
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -27,6 +27,19 @@ Sequel::Model with SequelSimpleCallbacks plugin added:
|
|
27
27
|
before_save :do_something, :unless => :some_condition?
|
28
28
|
end
|
29
29
|
|
30
|
+
== Installation
|
31
|
+
|
32
|
+
You can install the gem manually using:
|
33
|
+
|
34
|
+
gem install sequel_simple_callbacks
|
35
|
+
|
36
|
+
You also have the option to declare it in your Gemspec file if using
|
37
|
+
bundler:
|
38
|
+
|
39
|
+
gem 'sequel_simple_callbacks'
|
40
|
+
|
41
|
+
== Notes
|
42
|
+
|
30
43
|
If any of the callbacks returns false then additional checking will be
|
31
44
|
pre-empted and the callback will return false. This will halt processing
|
32
45
|
of not only the chain, but the entire operation being performed, as is the
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/test/models/conditional.rb
CHANGED
data/test/models/example.rb
CHANGED
@@ -10,9 +10,9 @@ end
|
|
10
10
|
class ExampleModel < Sequel::Model(:examples)
|
11
11
|
include ModelTriggers
|
12
12
|
|
13
|
-
plugin
|
13
|
+
plugin SequelSimpleCallbacks
|
14
14
|
|
15
|
-
|
15
|
+
SequelSimpleCallbacks::INSTALLABLE_HOOKS.each do |hook|
|
16
16
|
send(hook, :"do_#{hook}", :if => :triggers_active?)
|
17
17
|
|
18
18
|
define_method(:"do_#{hook}") do
|