Chore: Switch from Carrierwave to ActiveStorage (#393)

This commit is contained in:
Sojan Jose
2020-01-07 22:59:17 +05:30
committed by Pranav Raj S
parent f02d422b6a
commit f875a09fb7
29 changed files with 192 additions and 164 deletions

View File

@@ -2,7 +2,7 @@ class LocalResource
attr_reader :uri
def initialize(uri)
@uri = uri
@uri = URI(uri)
end
def file
@@ -11,6 +11,7 @@ class LocalResource
f.write(io.read)
f.close
end
@file.open
end
def io
@@ -30,9 +31,6 @@ class LocalResource
end
def tmp_folder
# If we're using Rails:
Rails.root.join('tmp')
# Otherwise:
# '/wherever/you/want'
end
end