Skip to content

Instantly share code, notes, and snippets.

View ivancea's full-sized avatar
💭
Looking for something interesting to do...

Iván Cea Fontenla ivancea

💭
Looking for something interesting to do...
View GitHub Profile
@NealJMD
NealJMD / liquid_i18n.rb
Last active September 20, 2022 14:41
Rails I18n in Liquid templating, including interpolated values. Spec can be found at https://gist.github.com/NealJMD/16cf509164bb71215a87
# The <tt>LiquidI18nRails</tt> module allows us to use the +translate+
# method of Rails' I18n library within liquid templates. To use it,
# simply pass the name of the text entry to the +t+ filter:
#
# {{ 'fundraiser.thank_you' | t }}
#
# The above tag is equivalent to calling:
#
# I18n.t('fundraiser.thank_you')
#