> I think these extensions are just the hints to call a chain of template > renderers under Sprockets & Tilt. So .js.coffee.erb would first render with > ERB, then CoffeeScript. I read thru the Sprockets & Tilt source and you can > just keep tacking these things on. Pretty clever in my book.
Yep : DHH showed this exact feature last week at RailsConf. > About the only thing I have run into that is not an issue with either of > these libraries is getting my editor to focus on the proper language > scope. For instance, if I were editing a a foo.css.scss.erb I would want my > editor to not use my normal erb language theme but instead .scss. This is > easily solvable on my own end tho. > > - Ken > On May 22, 2011, at 9:08 PM, Mislav Marohnić wrote: > > Rails 3.1 generators* create stubs for ".css.scss" and ".js.coffee" files in > "app/assets/" directory. > Why the double extension? It made sense in view templates (e.g. > "index.html.erb") because of the request formats and the fact that some > template engines can render multiple types of output, not just html. > Assets don't have request formats nor can Sass and CoffeeScript render > anything but CSS and JavaScript. > I understand this might have been an attempt to preserve the current "naming > convention", but is it worth preserving this "convention" now that it lost > its meaning? > > [*]: > https://github.com/rails/rails/blob/ba3ea9c/railties/lib/rails/generators/rails/assets/assets_generator.rb#L28-36 > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > -- Paul Campbell [email protected] - - - - - - - - - - - - - - - - - - - web http://hypertiny.ie blog http://www.pabcas.com twitter http://www.twitter.com/paulca github http://www.github.com/paulca phone +353 87 914 8162 - - - - - - - - - - - - - - - - - - - -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
