fabrication 2.7.0 → 2.7.1

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: e6ce2db9b460bb009b38822ad0046da19e88a3b4
4
- data.tar.gz: ddc6ce7ea3032c887ba33482a925eeb92aa3314d
3
+ metadata.gz: 0d0a893a4b3d57bcfb26ab42020cc3150f716438
4
+ data.tar.gz: 8b7c2f8933feb8ab5de7bc35c5eb7808ca2f4b1c
5
5
  SHA512:
6
- metadata.gz: 2752606ddb6ad0ffabf399b35f5c63c6154f8991f636ba3997e2ca9d0f53b1d4043b658aeb37c93b0955fb3fda48a9b9e0e0f0f5d1076a17a760227fab66677e
7
- data.tar.gz: 23cc0d4b943234def18f3c2e44bf4f70c4e642d397026083dde2f298a392f73bdaac139c1f249a54a9ff032b544069a207876bfc72a9adabf968a192cb00b067
6
+ metadata.gz: 6348e9098f88d32c05351ad60832764592fa79d18a129735490914b41b37658438c5bafe9ba7ae9be6522c3faeec256e32673ca121686fc168f1023c7f1f5474
7
+ data.tar.gz: 237b5061848736772ab368fbb98e7daa6780a1de425c65736b2572c99e3bc687ffe0493a8b8db40c0d5e6964486e8d6249879ac4c6506d670fababf92536d1b2
@@ -53,16 +53,14 @@ class Fabrication::Schematic::Manager
53
53
  def resolve_class(name, parent, options)
54
54
  Fabrication::Support.class_for(
55
55
  options[:class_name] ||
56
- (parent && parent.klass.name) ||
56
+ (parent && parent.klass) ||
57
57
  options[:from] ||
58
58
  name
59
- ).tap do |klass|
60
- raise Fabrication::UnfabricatableError, "No class found for '#{name}'" unless klass
61
- end
59
+ ) || (raise Fabrication::UnfabricatableError, "No class found for '#{name}'")
62
60
  end
63
61
 
64
62
  def schematic_for(name, options, &block)
65
- parent = self[options[:from]] if options[:from]
63
+ parent = self[options[:from].to_s] if options[:from]
66
64
  klass = resolve_class(name, parent, options)
67
65
 
68
66
  if parent
@@ -1,3 +1,3 @@
1
1
  module Fabrication
2
- VERSION = '2.7.0'
2
+ VERSION = '2.7.1'
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.7.0
4
+ version: 2.7.1
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-05-06 00:00:00.000000000 Z
11
+ date: 2013-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord