# RoR & YML

**URL:** <https://www.ruby-forum.com/t/ror-yml/182588>\
**Category:** Rails\
**Created:** [January 30, 2010, 1:47pm UTC](https://www.ruby-forum.com/t/ror-yml/182588 "2010-01-30T13:47:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [January 30, 2010, 1:47pm UTC](https://www.ruby-forum.com/t/ror-yml/182588/1 "2010-01-30T13:47:44Z")

</div>

In  
ruby\lib\ruby\gems\1.8\gems\actionpack-2.3.5\lib\action\_view\locale\en.yml  
I see

activerecord:  
errors:  
template:  
header:  
one: “1 error prohibited this {{model}} from being saved”  
other: “{{count}} errors prohibited this {{model}} from being  
saved”  
# The variable :count is also available

Where does “model” come from? Where can I find documentation about how  
RoR (Ruby?) interacts with \*.yml files.

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [January 30, 2010, 2:23pm UTC](https://www.ruby-forum.com/t/ror-yml/182588/2 "2010-01-30T14:23:42Z")

</div>

Ralph S. wrote:

> In  
> ruby\lib\ruby\gems\1.8\gems\actionpack-2.3.5\lib\action\_view\locale\en.yml  
> I see
> 
> activerecord:  
> errors:  
> template:  
> header:  
> one: “1 error prohibited this {{model}} from being saved”  
> other: “{{count}} errors prohibited this {{model}} from being  
> saved”  
> # The variable :count is also available
> 
> Where does “model” come from? Where can I find documentation about how  
> RoR (Ruby?) interacts with \*.yml files.

I think you’re asking the wrong question. The interpolation of  
{{model}} has nothing to do with Ruby’s handling of YAML, but is rather  
part of Rails’ I18N routines. Check their docs for more.

And consider fast\_gettext for I18N instead. It’s a lot nicer than  
Rails’ built-in system.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
