tenon 1.0.23 → 1.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tenon/has_asset.rb +4 -5
- data/lib/tenon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51e3dfd4eec0ec3104f1afc795d75eeb5292db1
|
4
|
+
data.tar.gz: 477f777649a2dd22dada4276b83b0d790779025f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb859b646329b05bcc3c96a2716c0dfd5a672230c0ec5ecaa056a03301dbf78816fd8503c7abca4f59eae2976d7cc68243d2a7203d867007565786f1bd863620
|
7
|
+
data.tar.gz: 16c6c04d609882ed9e654d38f43958058ccf29ce81d8ef676554b610b1f3df8cc632112191d497f832d7361227bbce48e5f2edcb36228fc418ccf5d17fc8c00f
|
data/lib/tenon/has_asset.rb
CHANGED
@@ -65,13 +65,12 @@ module Tenon
|
|
65
65
|
|
66
66
|
def build_asset_setter(asset_name)
|
67
67
|
define_method("#{asset_name}=") do |val|
|
68
|
-
attrs = { asset_attributes: { attachment: val } }
|
69
68
|
join = send("#{asset_name}_join") || send("build_#{asset_name}_join")
|
70
|
-
join.
|
69
|
+
join.asset ||= join.build_asset
|
70
|
+
join.asset.attachment = val
|
71
71
|
join.save
|
72
|
-
asset
|
73
|
-
asset.
|
74
|
-
attach = ProxyAttachment.new(asset, self.class, asset_name)
|
72
|
+
join.asset.item_assets << join
|
73
|
+
attach = ProxyAttachment.new(join.asset, self.class, asset_name)
|
75
74
|
instance_variable_set("@#{asset_name}", attach)
|
76
75
|
end
|
77
76
|
end
|
data/lib/tenon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tenon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- factor[e] design initiative
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: better_errors
|