Skip to content

Instantly share code, notes, and snippets.

@rafaelss
Created May 24, 2010 12:36
Show Gist options
  • Save rafaelss/411807 to your computer and use it in GitHub Desktop.
Save rafaelss/411807 to your computer and use it in GitHub Desktop.
class Expression
include Mongoid::Document
field :english
end
<ul>
{{#expressions}}
{{#map}}
<li>{{english}}</li>
{{/map}}
<br class="clear" />
{{/expressions}}
</ul>
class Index < Mustache
def expressions
results = Expression.where(some_conditions)
results.in_groups_of(4)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment