{"number":2,"pull_request":{"number":2,"issue_url":"https://github.com/sstephenson/ruby-ejs/issues/2","head":{"label":"duncanbeevers:bind_to_locals","repo":{"master_branch":null,"name":"ruby-ejs","created_at":"2011-10-24T23:15:38Z","size":96,"clone_url":"https://github.com/duncanbeevers/ruby-ejs.git","private":false,"updated_at":"2011-10-25T01:05:15Z","watchers":1,"ssh_url":"git@github.com:duncanbeevers/ruby-ejs.git","url":"https://api.github.com/repos/duncanbeevers/ruby-ejs","git_url":"git://github.com/duncanbeevers/ruby-ejs.git","language":"Ruby","fork":true,"svn_url":"https://svn.github.com/duncanbeevers/ruby-ejs","id":2639949,"pushed_at":"2011-10-25T01:05:15Z","open_issues":0,"homepage":"","description":"EJS (Embedded JavaScript) template compiler for Ruby","forks":0,"html_url":"https://github.com/duncanbeevers/ruby-ejs","owner":{"avatar_url":"https://secure.gravatar.com/avatar/388133a4da5b5e2dc9bbfaa4ba796426?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"388133a4da5b5e2dc9bbfaa4ba796426","url":"https://api.github.com/users/duncanbeevers","id":7367,"login":"duncanbeevers"}},"sha":"39d31287b0853b538d1011b3d9e78b1fedd1adc4","ref":"bind_to_locals","user":{"avatar_url":"https://secure.gravatar.com/avatar/388133a4da5b5e2dc9bbfaa4ba796426?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"388133a4da5b5e2dc9bbfaa4ba796426","url":"https://api.github.com/users/duncanbeevers","id":7367,"login":"duncanbeevers"}},"merged_by":null,"created_at":"2011-10-25T01:08:26Z","changed_files":2,"merged":false,"body":"I'm not sure how 'print' gets used inside the EJS evaluation block, and no tests covered its usage.\r\n\r\nI made the evaluation context bind to the provided locals object. This makes it simple to forward the provided object along to other renders. For example, in Rails, I can now create a template like this:\r\n\r\n    <div id=\"some_div\">\r\n      <%= JST['another_template'](this) %>\r\n    </div>","comments":0,"title":"Bind to locals","additions":6,"diff_url":"https://github.com/sstephenson/ruby-ejs/pull/2.diff","updated_at":"2011-10-25T01:08:26Z","url":"https://api.github.com/repos/sstephenson/ruby-ejs/pulls/2","id":429787,"patch_url":"https://github.com/sstephenson/ruby-ejs/pull/2.patch","mergeable":null,"merged_at":null,"commits":2,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/388133a4da5b5e2dc9bbfaa4ba796426?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"388133a4da5b5e2dc9bbfaa4ba796426","url":"https://api.github.com/users/duncanbeevers","id":7367,"login":"duncanbeevers"},"deletions":2,"html_url":"https://github.com/sstephenson/ruby-ejs/pull/2","base":{"label":"sstephenson:master","repo":{"master_branch":null,"name":"ruby-ejs","created_at":"2011-05-17T21:01:36Z","size":156,"clone_url":"https://github.com/sstephenson/ruby-ejs.git","private":false,"updated_at":"2011-10-25T01:08:26Z","watchers":37,"ssh_url":"git@github.com:sstephenson/ruby-ejs.git","url":"https://api.github.com/repos/sstephenson/ruby-ejs","git_url":"git://github.com/sstephenson/ruby-ejs.git","language":"Ruby","fork":false,"svn_url":"https://svn.github.com/sstephenson/ruby-ejs","id":1762906,"pushed_at":"2011-10-25T01:08:26Z","open_issues":1,"homepage":"","description":"EJS (Embedded JavaScript) template compiler for Ruby","forks":4,"html_url":"https://github.com/sstephenson/ruby-ejs","owner":{"avatar_url":"https://secure.gravatar.com/avatar/5b9fe87ec1faa67a4599782930f45ec9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5b9fe87ec1faa67a4599782930f45ec9","url":"https://api.github.com/users/sstephenson","id":2603,"login":"sstephenson"}},"sha":"6cddc75651537d1c1e5f26e099fdc010dd5ca842","ref":"master","user":{"avatar_url":"https://secure.gravatar.com/avatar/5b9fe87ec1faa67a4599782930f45ec9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5b9fe87ec1faa67a4599782930f45ec9","url":"https://api.github.com/users/sstephenson","id":2603,"login":"sstephenson"}},"state":"open"},"action":"opened"}