Skip to content

Commit

Permalink
people template with ICanHaz.js and mustache.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Franco Sellitto committed Jul 6, 2011
1 parent 6b2f6b3 commit fd334f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 5 additions & 3 deletions app/assets/javascripts/people.js.coffee
Expand Up @@ -15,9 +15,11 @@ class PersonCollection extends Backbone.Collection

$ ->
collection = new PersonCollection
collection.fetch()
html = ich.people(collection)
$("body").append(html)
collection.fetch({
success: ->
html = ich.people(collection)
$("body").append(html)
})



Expand Down
18 changes: 8 additions & 10 deletions app/views/people/index.html.haml
Expand Up @@ -3,18 +3,16 @@
%p.name
{{ name }}

%script#person_index.partial{:type => "text/html"}
%li
%p.name
{{name}}


%script#people{:type => "text/html"}
%ul
{{#models}}
{{ name }}
{{#attributes}}
{{> person_index}}
{{/attributes}}
{{/models}}

%script#person_index{:type => "text/html"}
%li
%p.name
{{ name }}


/.my_id

0 comments on commit fd334f8

Please sign in to comment.