You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-21Lines changed: 2 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,29 +16,10 @@ After bundling you need to run the initial installation generator:
16
16
17
17
$ rails g rails_script:install
18
18
19
-
After the generator finishes, you will be prompted to add some JavaScript to your application layout. The code is responsible for initializing and call the action specific JavaScript. This snippet should be added before the closing body tag.
19
+
After the generator finishes, you will be prompted to add helper call to your application layout. The generated code is responsible for initializing and call the action specific JavaScript. This helper shouyld be called before the closing body tag.
20
20
21
-
For ERB:
22
21
```
23
-
<script>
24
-
jQuery(function() {
25
-
window.$this = new (App.<%= controller_path.split(/\/|_/).map(&:capitalize).join('') %> || App.Base)();
26
-
if (typeof $this.<%= action_name %> === 'function') {
27
-
return $this.<%= action_name%>.call();
28
-
}
29
-
});
30
-
</script>
31
-
```
32
-
33
-
For HAML:
34
-
```
35
-
:javascript
36
-
jQuery(function() {
37
-
window.$this = new (App.#{controller_path.split(/\/|_/).map(&:capitalize).join('')} || App.Base)();
0 commit comments