worthwhile-models 0.1.1 → 0.1.2

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: 58f35d866b0060f648dfa182e9f9ad547e1c68b9
4
- data.tar.gz: f8aabad35e8d3e43edb296f8aea2f1e1987071b3
3
+ metadata.gz: ce3c28231d5734e5a701cf43ef25f17c2e9a6cac
4
+ data.tar.gz: 8a4c9c090fbca9e3ae7eec246cbe5dd6286aade6
5
5
  SHA512:
6
- metadata.gz: 41f4d8bffd869208af3c9b2164b758b6e08d055f14bdb8bf86e48cf5ae7b2663e75a9e5ee1375c2d2a4f5cda09c5940e709b3e48dbc5e0d243bdf0b5c6492bfb
7
- data.tar.gz: 8922c9bce4a1b64bc7b10d8524b6851a2730c5b01f12de63e4c22ecc40104b98a8b4560ab042fdd6c7b7da3494369ebd99e2a81d93941b5e603c53d581dc5580
6
+ metadata.gz: 797ae083995c7e30deab404fa9121dbf685a2895bfc33fd3245b6f2ee95258e4bc40703c7b85dc2e300eebe3f29d267f2293945f280624bb1ae9313e6ee4f35e
7
+ data.tar.gz: 4ad4bd047c7b3af624b769ad66022586f59f4684860a510ac02b362c2c49d11db801b5ef7dcf1e701e614d3c043a7e489b766e7cd9cbed893cccfef7f8701204
@@ -12,7 +12,7 @@ module Worthwhile
12
12
  include Sufia::GenericFile::Metadata
13
13
  include Sufia::GenericFile::Versions
14
14
  include Sufia::Permissions::Readable
15
- include CurationConcern::VersionedContent
15
+ include ::CurationConcern::VersionedContent
16
16
 
17
17
  included do
18
18
  belongs_to :batch, property: :is_part_of, class_name: 'ActiveFedora::Base'
@@ -27,8 +27,10 @@ module Worthwhile
27
27
  # @example
28
28
  # link_to '...', SolrDocument(:id => 'bXXXXXX5').new => <a href="/dams_object/bXXXXXX5">...</a>
29
29
  def to_model
30
- m = ActiveFedora::Base.load_instance_from_solr(id, self)
31
- m.class == ActiveFedora::Base ? self : m
30
+ @model ||= begin
31
+ m = ActiveFedora::Base.load_instance_from_solr(id, self)
32
+ m.class == ActiveFedora::Base ? self : m
33
+ end
32
34
  end
33
35
 
34
36
  def collection?
@@ -48,7 +50,7 @@ module Worthwhile
48
50
  Array(self[Solrizer.solr_name('human_readable_type', :stored_searchable)]).first
49
51
  end
50
52
 
51
- def representative
53
+ def representative
52
54
  Array(self[Solrizer.solr_name('representative', :stored_searchable)]).first
53
55
  end
54
56
 
@@ -1,5 +1,5 @@
1
1
  module Worthwhile
2
2
  module Models
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worthwhile-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-09 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hydra-head