1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Update README.md

This commit is contained in:
Karl Bryan Paragua 2015-04-25 17:52:53 +08:00
parent 17b4d8bb21
commit 0441700c08

View file

@ -270,6 +270,12 @@ class UsersController < ApplicationController
end
```
## Hook
`insert_paloma_hook` is a helper method that you can use in your views to insert Paloma's HTML hook.
Inside this HTML hook is where the magic happens. This is the reason why Paloma can magically know what Javascript controller/action to execute. To further understand how Paloma works, you can inspect the HTML hook, by checking at the generated HTML (*inspect element*) and locate the `div` element that has the class `js-paloma-hook`.
Ideally, you just need to call `insert_paloma_hook` in your layouts, since the layout will always be included in every rendered view. But if you are rendering a view without a layout, make sure to call `insert_paloma_hook` in that view.
## Turbolinks Support