simple_attribute 0.1.0 → 0.1.1

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: 7d7d27a575f2e75a680cb3ee8ab06a253e33c41c
4
- data.tar.gz: ca05d02682f40efe436d6fc21f0c429a29bbaa53
3
+ metadata.gz: 30aeee5921d4baaf2745a62c810f6970db01dae8
4
+ data.tar.gz: 7211e0a0902cbd9ec116a9ffc45a3608ec6965d6
5
5
  SHA512:
6
- metadata.gz: df9b011f0f07efd670009fa2b23b74a41daaa87ab40e0fc25909d34c46b144995a5e8c8b9be31d6cfe6352f60c7ba2d81e7652a3b0730a43e9a3a9e0f54686ab
7
- data.tar.gz: 40d43acd3e77581584e3f85f5ce7807a7d516b5034dd817a5f0abf311bd2e50e7e45e24165e98d48685e9b92d32c1ca6aa4e81e5e6725fc344322f95ac76d138
6
+ metadata.gz: d36fe80040f4cc26ba41ec4311a9dd17e5d4f45af6d278972b74450e48d5f5bfee9d5ff13db3458f379e5b0847c9f0fce30d98482cf5bae3959e9d2a2f4da852
7
+ data.tar.gz: 32cfdbaea05f094922a7433b1838748d591332df1752417777f22edfc1f81c769839b4e9cedf07c640ec35a7b51b1bf7fc2c113b685ca04abee4c3756abd0cff
@@ -28,7 +28,8 @@ module SimpleAttribute
28
28
 
29
29
  # Find file type
30
30
  def find_file_type
31
- media_type = MiniMime.lookup_by_filename("#{@value}").content_type.split('/').first
31
+ media_type = MiniMime.lookup_by_filename("#{@value}")
32
+ media_type = media_type.content_type.split('/').first unless media_type.nil?
32
33
  available = [:image, :video]
33
34
 
34
35
  available.find { |t| "#{t}" == media_type } || :file
@@ -1,3 +1,3 @@
1
1
  module SimpleAttribute
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_attribute
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonian Guveli
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-14 00:00:00.000000000 Z
11
+ date: 2017-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview