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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7735363c5653ee2a155408d190a08d24b5d71e91
4
- data.tar.gz: bb459395e83251585ecf18097e6535dbe94ed8a4
3
+ metadata.gz: e51e3dfd4eec0ec3104f1afc795d75eeb5292db1
4
+ data.tar.gz: 477f777649a2dd22dada4276b83b0d790779025f
5
5
  SHA512:
6
- metadata.gz: f71f79c8ed4681c5853fdcecc63206e4357012a369afa427a94660fc399d419ce6627e2825eafef1b636ac10d0d0209318d1a4196ded1062914a0780c554bdd2
7
- data.tar.gz: 0133701fcd2d9a680f1961e6df97e8c803f3d50ffbe24c82d9ec11e41ede0e33c98f0c7f48d16e48d987bb2bbbff643fbf7fe67bcd5178a04f53934fb5d91705
6
+ metadata.gz: cb859b646329b05bcc3c96a2716c0dfd5a672230c0ec5ecaa056a03301dbf78816fd8503c7abca4f59eae2976d7cc68243d2a7203d867007565786f1bd863620
7
+ data.tar.gz: 16c6c04d609882ed9e654d38f43958058ccf29ce81d8ef676554b610b1f3df8cc632112191d497f832d7361227bbce48e5f2edcb36228fc418ccf5d17fc8c00f
@@ -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.assign_attributes(attrs)
69
+ join.asset ||= join.build_asset
70
+ join.asset.attachment = val
71
71
  join.save
72
- asset = join.asset
73
- asset.item_assets << join
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
@@ -1,3 +1,3 @@
1
1
  module Tenon
2
- VERSION = '1.0.23'
2
+ VERSION = '1.0.24'
3
3
  end
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.23
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-24 00:00:00.000000000 Z
11
+ date: 2014-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_errors