views:

52

answers:

1
flash[:notice] = t('flash.notice.order.creditcard.valid')

I can sort of guess what this flash message probably outputs to the user but what is this 't' method and what kind of object is flash.notice.order.creditcard.valid? Is this application-specific logic or a Rails usage?

+5  A: 

t is an alias for the translate method. The flash.notice.order.creditcard.valid is the name of the message to translate. It should be defined in the various locale files found in config/locale/.

Pesto
Awesome. Thanks so much!!!
Michael Jay