fabrication 2.6.4 → 2.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d12c84a93e187048da75b640cd3e72267d8186a
4
- data.tar.gz: 6059cd51483dd803a9e87371e2e5488e3759624b
3
+ metadata.gz: 481e59434f64d19e056b1f3e229cb4b994b42a49
4
+ data.tar.gz: 987d9954221536a51db87573125d36072df177c5
5
5
  SHA512:
6
- metadata.gz: 2dc0c1b558750f764c6eba317f0d89013b10c39a7910cd448e6f184f9d68982502388adb143a298dff8646075bcf12deb72845122d016d0738f139b39454769b
7
- data.tar.gz: 4fbfa0c3879d981fe9fdb47f7f3401e416cf3d4dad48f996d8e96226ff279a8110fda8d933101f09fe903d785faeca24bfba1cd30db34af44db03e86550b633d
6
+ metadata.gz: 4d5a14b53c3fff5a083b5b9dfcbd88b4b93d35ac7e9f487c9e737569ae64e21b54729743fcfc1ab399c4210744b6cefb9803792738a3d117741a0b33a909566b
7
+ data.tar.gz: 16cda125745d19e4018d5de2915158c57e6c3ee82ed7bb11994328acc92c483c209f62544af2312724ff2b7d2acb3e21c119ec4427b1989b3b033bfd8167f45e
@@ -2,7 +2,7 @@ class Fabrication::Generator::Sequel < Fabrication::Generator::Base
2
2
 
3
3
  def initialize(klass)
4
4
  super
5
- __klass.plugin :instance_hooks unless __klass.new.respond_to? :after_save_hook
5
+ load_instance_hooks
6
6
  end
7
7
 
8
8
  def self.supports?(klass)
@@ -30,4 +30,11 @@ class Fabrication::Generator::Sequel < Fabrication::Generator::Base
30
30
  __instance.valid?
31
31
  end
32
32
 
33
+ private
34
+
35
+ def load_instance_hooks
36
+ klass = __klass.respond_to?(:cti_base_model) ? __klass.cti_base_model : __klass
37
+ klass.plugin :instance_hooks unless klass.new.respond_to? :after_save_hook
38
+ end
39
+
33
40
  end
@@ -1,3 +1,3 @@
1
1
  module Fabrication
2
- VERSION = '2.6.4'
2
+ VERSION = '2.6.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fabrication
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.4
4
+ version: 2.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Elliott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-29 00:00:00.000000000 Z
11
+ date: 2013-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord