lib/attachs/storages/local.rb in attachs-0.3.0 vs lib/attachs/storages/local.rb in attachs-0.3.1
- old
+ new
@@ -11,10 +11,14 @@
end
def size(path)
::File.size realpath(path)
end
+
+ def realpath(path)
+ base_path.join path
+ end
def url(path)
::File.join Rails.application.config.attachs.base_url, path
end
@@ -39,13 +43,9 @@
protected
def tmp?
@tmp == true
- end
-
- def realpath(path)
- base_path.join path
end
def base_path
Rails.root.join tmp? ? 'tmp' : 'public'
end