tenon 1.0.33 → 1.0.35

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: f48848283dc73ac85ecea747dd4bf396b5e42ae9
4
- data.tar.gz: b683d0b08c49bc318875467d5b15fea0d52ee2b4
3
+ metadata.gz: ab60d1a2429cde052f64cb51d8f46dfdbe44f141
4
+ data.tar.gz: d8ef8b3d01045a4aeda239de77de8d4b9654166e
5
5
  SHA512:
6
- metadata.gz: afab00e3d5849bd2c0bdb0e8af6dccef4855ed5b532f95283fc174fe7075cf73872856f89ee13177bcdfcf1e9f8cf95e95fb58bb0357c920728391d7a1b192be
7
- data.tar.gz: 0dc3fef19b13dc12d98b843cfdafc9abb053d0f4e9f165e1137f39aa81ed7d59f62d4d67aa72df87b3602a3411eeb14291dbfa993dc68f125a6c0bbb922e65f4
6
+ metadata.gz: ca5875f4d593e38db1e1c7e8cef463791e06c2e991538bd5814db25b8e8fa6604d3cdc687aa68224bbbd67d4f43eae324ee4a814047819700412871940895892
7
+ data.tar.gz: ace7ed23b0bd225113c285660cde7227e72588d8bd4be449847aed4e78074e55cae64a841b463d05118ee7be8dd5e76a93fbd71c3d751ca0fc0f6ce4dcb430a2
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 YOURNAME
1
+ Copyright 2014 factor[e] design initiative Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -7,7 +7,7 @@ module Tenon
7
7
 
8
8
  rescue_from CanCan::AccessDenied do |exception|
9
9
  flash[:warning] = 'You are not authorized to access that page.'
10
- redirect_to '/tenon'
10
+ redirect_to root_path
11
11
  end
12
12
 
13
13
  private
@@ -34,7 +34,7 @@ module Tenon
34
34
  define_method(asset_name) do
35
35
  if instance_variable_get("@#{asset_name}")
36
36
  instance_variable_get("@#{asset_name}")
37
- else
37
+ elsif persisted?
38
38
  relation = Tenon::ItemAsset.where(item_type: self.class.to_s, item_id: id, asset_name: asset_name)
39
39
  asset = relation.first.try(:asset).try(:attachment)
40
40
  if asset
data/lib/tenon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tenon
2
- VERSION = '1.0.33'
2
+ VERSION = '1.0.35'
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.33
4
+ version: 1.0.35
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-08-18 00:00:00.000000000 Z
11
+ date: 2014-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_errors
@@ -1535,6 +1535,6 @@ test_files:
1535
1535
  - spec/models/tenon/tenon_content/row_spec.rb
1536
1536
  - spec/models/tenon/user_spec.rb
1537
1537
  - spec/services/tenon/redirector_spec.rb
1538
- - spec/spec_helper.rb
1539
- - spec/support/integration_example_group.rb
1540
1538
  - spec/support/request_helpers.rb
1539
+ - spec/support/integration_example_group.rb
1540
+ - spec/spec_helper.rb