Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (25 sloc) 0.814 kb
<div class="hero-unit">
<h3>Params</h3>
{{#params}}
<p>{{action}} action on {{controller}} controller.</p>
{{/params}}
</div>
<script type="text/javascript">
$(function () {
var pageId = window.location.pathname.split('/')[2];
geddy.io.addListenersForModels(['<%= names.constructor.singular %>']);
geddy.model.<%= names.constructor.singular %>.on('update', function (<%= names.property.singular %>) {
if (<%= names.property.singular %>.id == pageId) {
var properties = <%= names.property.singular %>.toData();
for (var i in properties) {
$('.'+i).text(properties[i]);
}
}
});
geddy.model.<%= names.constructor.singular %>.on('remove', function (id) {
if (id == pageId) {
window.location = '/<%= names.property.plural %>';
}
});
});
</script>
Jump to Line
Something went wrong with that request. Please try again.