diff options
| author | mo <mo.khan@gmail.com> | 2017-09-24 14:21:35 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2017-09-24 14:21:35 -0600 |
| commit | c14120056549765beb35f5a35f8c76e0e8ef7397 (patch) | |
| tree | c126ad5b9ae3361aeed9b037533be4452ff217b3 /app/views/application | |
| parent | 4887ba54da7ff8a25347b58c4a426cb5cf1dee3b (diff) | |
create helper to generate a backbone collection.
Diffstat (limited to 'app/views/application')
| -rw-r--r-- | app/views/application/_backbone_collection.html.erb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/views/application/_backbone_collection.html.erb b/app/views/application/_backbone_collection.html.erb new file mode 100644 index 00000000..a806939f --- /dev/null +++ b/app/views/application/_backbone_collection.html.erb @@ -0,0 +1,5 @@ +<% cache items do %> +<%= javascript_tag do %> +csx.<%= items.name.split('::').last.pluralize %> = new Backbone.Collection(<%= items.to_json.html_safe %>); +<% end %> +<% end %> |
