Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add class to uploader so we can style it, add a comment in the readme…

… about a possible solution to style with.
  • Loading branch information...
commit 9c69998f4ef9e34165916585568fe99371cec946 1 parent 2723e0d
@kenmazaika authored
View
11 README.md
@@ -32,6 +32,7 @@ File-Upload-Cache works like CarrierWave's Cache
* Can be easily configured to use different stores instead of just the file system (redis, memcache, etc)
* Cached assets are served through the rails environment as dynamic content, instead of static content that can be served directly by Rack or a server like Apache or Nginx.
* Built in integration with the full stack. Formtastic integration & Javascript for dealing with the cached value
+ * Works with heroku without needing to change rack configuration file (config.ru)
Instructions
------------
@@ -84,10 +85,14 @@ Add the following javascript to the pages that have the input in it:
});
```
+Optionally add this to your stylesheet to have the fields displayed inline:
+
+```
+ .cache_existing { display:inline; margin-left:10px }
+```
Demo Application
----------------
-An example of using file_upload_cache with carrierwave can be found here: https://github.com/kenmazaika/pictures
-
-
+An example of using file_upload_cache with carrierwave can be found here: https://github.com/kenmazaika/pictures.
+The demo of the gem can be viewed here: http://cold-sunset-3667.heroku.com/.
View
2  app/inputs/uploader_input.rb
@@ -24,7 +24,7 @@ def file_html
def existing_html
if method_present?
existing = template.content_tag(:span, object.send("cached_#{method}").try(:original_filename))
- template.content_tag(:div, :id => "#{base_id}_existing") do
+ template.content_tag(:div, :id => "#{base_id}_existing", :class => 'cache_existing') do
template.link_to(existing, Rails.application.routes.url_helpers.file_upload_cache_cached_file_path(object.send("cached_#{method}").try(:id))) <<
template.content_tag(:span, " replace", :id => "#{base_id}_replace")
end
View
2  file_upload_cache.gemspec
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
s.summary = "Insert FileUploadCache summary."
s.description = "Insert FileUploadCache description."
s.files = Dir["{app,lib,config}/**/*"] + ["Rakefile", "Gemfile"]
- s.version = "1.0.0"
+ s.version = "1.0.1"
s.authors = ['Ken Mazaika']
s.add_dependency 'uuid'
s.add_dependency 'rails'
Please sign in to comment.
Something went wrong with that request. Please try again.