Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
render partial to jquery template
this is a partial. <%= model.value %>
class SomeController < ApplicationController
def show
@template_model = SomeModel.new(:value => "${value}")
end
end
<html>
<head>
<script id="some-template" type="x-jquery-tmpl">
<%= render :partial => "some/partial", :locals => {:model => @template_model} %>
</script>
<script language="javascript" type="text/javascript">
$("#some-template").tmpl({value: "this is some data"});
</script>
</head>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.