README.md in plupload-rails-1.1.0 vs README.md in plupload-rails-1.2.0
- old
+ new
@@ -7,14 +7,14 @@
Install
--
Just add it got your Gemfile:
+```ruby
+gem 'plupload-rails'
+```
- gem 'plupload-rails'
-
-
Quick Start
--
Add to your application.js:
@@ -29,56 +29,55 @@
// optional, only if you want to use the jquery integration
//= require jquery.plupload.queue
-Add to your application.scss:
+Add to your application stylesheet:
- @import "jquery.plupload.queue";
+ //= require jquery.plupload.queue
-Alternatively (if you're not using SASS or SCSS), add the require to your application.css:
-
- = require jquery.plupload.queue
-
Simple example Haml for your views:
- div#uploader
- :javascript
- $(function(){
- $("#uploader").pluploadQueue({
- runtimes: 'gears,flash,silverlight,browserplus,html5',
- url: '#{images_path}',
- multipart_params: {
- '#{request_forgery_protection_token}': '#{form_authenticity_token}',
- '#{Rails.application.config.session_options[:key]}': '#{request.session_options[:id]}'
- }
- });
- });
+```haml
+div#uploader
+:javascript
+ $(function(){
+ $("#uploader").pluploadQueue({
+ runtimes: 'gears,flash,silverlight,browserplus,html5',
+ url: '#{images_path}',
+ multipart_params: {
+ '#{request_forgery_protection_token}': '#{form_authenticity_token}',
+ '#{Rails.application.config.session_options[:key]}': '#{request.session_options[:id]}'
+ }
+ });
+ });
+```
And the same in ERB:
- <script>
- $(function(){
- $("#uploader").pluploadQueue({
- runtimes: 'html5,flash,silverlight',
- url: '<%= sink_hole_path %>',
- multipart_params: {
- '<%= request_forgery_protection_token %>': '<%= form_authenticity_token %>',
- '<%= Rails.application.config.session_options[:key] %>': '<%= request.session_options[:id] %>'
- }
- });
- });
- </script>
+```erb
+<script>
+ $(function(){
+ $("#uploader").pluploadQueue({
+ runtimes: 'html5,flash,silverlight',
+ url: '<%= sink_hole_path %>',
+ multipart_params: {
+ '<%= request_forgery_protection_token %>': '<%= form_authenticity_token %>',
+ '<%= Rails.application.config.session_options[:key] %>': '<%= request.session_options[:id] %>'
+ }
+ });
+ });
+</script>
+```
-
Updating
--
When new versions of Plupload are released, simply update the gem to the latest version. When you notice that there's no gem for the latest plupload, please contact me (or even better, create an issue/ pull request).
License
--
Dual licensed under the [GPLv2 license](GPL-LICENSE.txt) and the [MIT license](MIT-LICENSE.txt). Plupload itself (including the JS, CSS, images, the Silverlight and Flash components) is licensed under GPLv2, unless you have acquired a [commercial license](http://plupload.com/license.php).
-Copyright © 2011-2013 Corin Langosch and contributors
+Copyright © 2011-2013 [Corin Langosch](http://www.corinlangosch.com) and contributors