There's this convention in Rails that when a file is first processed before 
the final output (e.g. from Sass to CSS or from ERB to HTML), names of 
those preprocessors are included in the file extension. So if I wanted 
"foo.css" to be generated from Sass, I'd call the file "foo.css.scss". And 
if I wanted (for whatever reason) to generate some of that Sass using ERB, 
it would be "foo.css.scss.erb".

But test fixtures are always .yml — and they allow ERB to be embedded 
inside. In fact, not only does ERB work with "posts.yml", it won't work at 
all if I named the file "posts.yml.erb" (just says "NoMethodError: 
undefined method `posts' ")

This got me confused today — when I needed to add some ERb to my fixtures. 
I know I'm nitpicking, but it seems bizarre to break this convention.

Am I missing something?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to