master
1class csx.Translation
2  constructor: (modelKey) ->
3    @modelKey = modelKey
4
5  errorFor: (attribute, scope) ->
6    attributeName = I18n.t("activerecord.attributes.#{@modelKey}.#{attribute}")
7    error = I18n.t("errors.messages.#{scope}")
8    "#{attributeName} #{error}"