Skip to content

Instantly share code, notes, and snippets.

@zimkies
zimkies / I18n_learnings.md
Last active August 29, 2015 13:56
I18n learnings

This is a summary of all of our key learnings from the I18n sprint. I've also added this to our best practices page

Presenters vs Decorators

Decorators

Decorators are classes we use to add presentation logic to specific models. They should be instantiated with a single model. An example is the Member Decorator The MemberDecorator adds presentation logic to the Member model, which shouldn't know how to render your friends_gender, for instance.

Presenters

try_guest_pass_html: |
Or try Grouper with a
<a href='%{next_path}' class='%{link_class}'>Guest Pass</a>
<br />
They run %{price} per person and can only be used on your first Grouper.