Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Make flash an object, not an array. #7

Merged
merged 1 commit into from Apr 1, 2013

Conversation

Projects
None yet
2 participants
Contributor

meeech commented Mar 13, 2013

This allows for iterating over all the flash object (in handlebars at least), and using the keys to set the class, rather than checking if we have a flash.error, flash.info, etc…

{{#each flash}}
  {{#each this}}
    <div class="alert alert-{{@key}}">
      <button type="button" class="close" data-dismiss="alert">&times;</button>
       {{this}}
    </div>
  {{/each}}
{{/each}}
@meeech meeech Make flash an object, not an array.
This allows for iterating over all the flash object (in handlebars at least), and using the keys to set the class, rather than checking if we have a flash.error, flash.info, etc…

{{#each flash}}
  {{#each this}}
    <div class="alert alert-{{@key}}">
      <button type="button" class="close" data-dismiss="alert">&times;</button>
       {{this}}
    </div>
  {{/each}}
{{/each}}
876d03a

@menztrual menztrual added a commit that referenced this pull request Apr 1, 2013

@menztrual menztrual Merge pull request #7 from meeech/make-flash-object
Make flash an object, not an array.
d9633f5

@menztrual menztrual merged commit d9633f5 into menztrual:master Apr 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment