Skip to content

Instantly share code, notes, and snippets.

View dmix's full-sized avatar

Daniel P. McGrady dmix

View GitHub Profile
(function() {
dust.register("tweet", body_0);
function body_0(chk, ctx) {
return chk.write("<div class=\"tweet\"><h3>").reference(ctx.get("user_name"), ctx, "h").write("</h3><p>").reference(ctx.get("tweet"), ctx, "h").write("</p></div>");
}
return body_0;
})();
<div class="tweet"><h3>dmix</h3><p>blah blah</p></div>
class TweetView extends Backbone.View
render: ->
tweet = this
dust.render("tweet", @model.toJSON(), (err, output) ->
$(tweet.el).html(output)
)
return this
Tweet = new TweetView({
model: {
<div class="tweet">
<h3>{user_name}</h3>
<p>{tweet}</p>
</div>
<script src="dust-core-0.3.0.min.js"></script>
<script src="tweet.js"></script>
{ "_id" : ObjectId( "4d0e99c713da5101b800180a" ),
"legacy_id" : 249,
"name" : "Federal Demonstration",
"language" : "en",
"facilities_count" : 1,
"custom_fields" : [],
"company_id" : 109,
"facility_ids" : [
138 ],
"legislation_info_ids" : [],
curl -i -H "Accept: application/json" -X GET https://www.nimonikapp.ca/templates/633?auth_token=LB3APWRA5mGtAdw6Wqni
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.7
X-UA-Compatible: IE=Edge,chrome=1
ETag: "09a8481d0bf31fa6d119f81df2580e06"
{"checklist":
{
"auditor_id":null,
"company_id":195,
"company_template":false,
"contribute_company_template":null,
"contribute_public_template":null,
"created_at":"2011-01-28T14:58:57-05:00",
"creator_id":404,
var email = $('#email').val();
$.ajax({
type: "POST",
dataType: 'json',
data: "email=" + email,
processData: false,
url: "/emails",
success: function (data) {
//insert html into page
$('#new_content').html(data["email"]);
SystemStackError in ApplyController#index
stack level too deep
RAILS_ROOT: /Users/dmix/development/Compass
Application Trace | Framework Trace | Full Trace
/Users/dmix/.rvm/gems/ruby-1.8.7-p302/gems/activerecord-2.3.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `current_connection_id'
/Users/dmix/.rvm/gems/ruby-1.8.7-p302/gems/activerecord-2.3.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'
/Users/dmix/.rvm/gems/ruby-1.8.7-p302/gems/activerecord-2.3.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
/Users/dmix/.rvm/gems/ruby-1.8.7-p302/gems/activerecord-2.3.10/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'