active_metadata 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,6 +15,7 @@ module ActiveMetadata
15
15
  require 'paperclip'
16
16
  require 'active_metadata/persistence/persistence'
17
17
  require 'active_metadata/value_formatter'
18
+ require 'active_metadata/exceptions'
18
19
 
19
20
  def self.included(klass)
20
21
  klass.class_eval do
@@ -173,7 +174,7 @@ module ActiveMetadata
173
174
  res = receiver.send item
174
175
  receiver = res.is_a?(Array) ? res.first : res
175
176
  end
176
- raise(RuntimeError.new,"[active_metdata] - Ancestor model is not yet persisted") unless receiver
177
+ raise(AncestorNotYetPersistedException.new,"[active_metdata] - Ancestor model is not yet persisted") unless receiver
177
178
  receiver
178
179
  end
179
180
 
@@ -0,0 +1,3 @@
1
+ module ActiveMetadata
2
+ class AncestorNotYetPersistedException < RuntimeError; end
3
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiveMetadata
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-10 00:00:00.000000000 Z
13
+ date: 2012-09-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -168,6 +168,7 @@ files:
168
168
  - db/migrate/01_active_metadata_migrations.rb
169
169
  - lib/active_metadata/base.rb
170
170
  - lib/active_metadata/engine.rb
171
+ - lib/active_metadata/exceptions.rb
171
172
  - lib/active_metadata/form_helper.rb
172
173
  - lib/active_metadata/helpers.rb
173
174
  - lib/active_metadata/persistence/attachment.rb
@@ -263,7 +264,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
263
264
  version: '0'
264
265
  segments:
265
266
  - 0
266
- hash: -3806434619195871137
267
+ hash: -3451596570019589333
267
268
  required_rubygems_version: !ruby/object:Gem::Requirement
268
269
  none: false
269
270
  requirements:
@@ -272,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
272
273
  version: '0'
273
274
  segments:
274
275
  - 0
275
- hash: -3806434619195871137
276
+ hash: -3451596570019589333
276
277
  requirements: []
277
278
  rubyforge_project: active_metadata
278
279
  rubygems_version: 1.8.19