README.md in select_all-rails-0.1.1 vs README.md in select_all-rails-0.2.0
- old
+ new
@@ -26,10 +26,23 @@
## Usage
<p>Call the function on main checkbox and add class 'selectable' to sub-checkboxes.</p>
-<p>Example link: https://jsfiddle.net/jigneshsatam/qvd2mtjd/1/ </p>
+<p>Example link: http://jigneshsatam.github.io/checkbox_select_all/index_demo.html </p>
+
+
+Rails haml example:
+```
+= check_box_tag 'checkAll'
+= check_box_tag 'selected_ids[]', "1", false, class: 'selectable'
+= check_box_tag 'selected_ids[]', "2", false, class: 'selectable'
+= check_box_tag 'selected_ids[]', "3", false, class: 'selectable'
+- content_for :page_js do
+ :javascript
+ $("#checkAll").select_all();
+```
+
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.