opium 1.0.1 → 1.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b53cd943726ac294d5bb3ea61bb30d61498e16d
4
- data.tar.gz: ad18f5457d8bef4c60de5d756b84cc4286b56c2c
3
+ metadata.gz: a7b983f587b24155aceba0b7d67e4f43d9d31268
4
+ data.tar.gz: 8ff6a3b9cb32a16d86f806deebd39501fb1488fc
5
5
  SHA512:
6
- metadata.gz: 48d6e38c6333a34a8f1670f3b8e66106239cb7d1a9b9c1018507f92f3872f05c76af2a8e5a8c759013829cf5166654c523263886639cdaba1a2d5ea03e05cd86
7
- data.tar.gz: cb0510ae5708a304b9882aa7d673a177c75d54a3e7ec3d613e4d3a99f8b1bcdf15b98cdabb988092f34db49863f4f9e3181cada967a4e5abff90ea91322753a6
6
+ metadata.gz: da6603baad99710eaa87abc7471a634e595c4a447f56adef656db72cd8b503446f53960c56d0c076da129a4c29b68600e28d7aee3bc0bd4f62d144d19751b33b
7
+ data.tar.gz: 11d379ac96cc6d7dfe72060e90c22facbe1bff66a17347f17d0ee3de0cb16e1a9fa770c7503d9154ee5d47de7572a2454ab634b994b56d8d26586df48f103acc
@@ -14,7 +14,9 @@ module Opium
14
14
 
15
15
  attr_reader :model_name
16
16
 
17
- delegate :to_partial_path, to: :model
17
+ def to_partial_path
18
+ model._to_partial_path
19
+ end
18
20
 
19
21
  def model
20
22
  models[model_name] ||= model_name.constantize
data/lib/opium/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Opium
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -283,4 +283,14 @@ describe Opium::Model::Criteria do
283
283
  end
284
284
  end
285
285
  end
286
+
287
+ describe '#to_partial_path' do
288
+ subject { Game.criteria }
289
+
290
+ it { expect { subject.to_partial_path }.to_not raise_exception }
291
+
292
+ it 'comes from the model class' do
293
+ expect( subject.to_partial_path ).to eq 'games/game'
294
+ end
295
+ end
286
296
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Bowers