Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update readme

  • Loading branch information...
commit 762fd6bf1289c58876555550a2c638491675e3c4 1 parent 49f6f55
@theodorton theodorton authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 README.md
View
9 README.md
@@ -63,6 +63,10 @@ Some examples:
# or
App.Products.Show.autoexec(productItem)
+ # If you want modules to be autoexec'd several times
+ App.Products.Show.autoexec
+ idempotent: false
+
Finally, just add the module name to a data-autoexec attribute:
<body data-autoexec="App.Products.Index">
@@ -90,8 +94,9 @@ Require your modules and activate autoexecution (with turbolinks - default in Ra
#= require autoexec_bat
#= require_tree ./folder-containing-your-modules
- jQuery(document).bind 'ready page:change', ->
- $('[data-autoexec]').autoexec()
+ jQuery(document).bind 'ready page:load', ->
+ $('[data-autoexec]').autoexec
+ idempotent: false
For Rails 3:
Please sign in to comment.
Something went wrong with that request. Please try again.