Cartilage/cartilage — pull request #29 by nmeans (2012-11-06 21:54:39+00:00)
Title: Use underscore in class name for view subfolder

This commit uses an underscore in the view's class name to look for the view template in a subfolder of templates that matches the portion of the view class name before the underscore. Eg:

`class window.App.Views.Metrics_ShowView extends Cartilage.View`

would look for a corresponding template at:

`/app/assets/templates/metrics/show_view.jst.ejs`

A class name with no underscore would look in the root templates directory for a corresponding template, just as it always has. Use of the underscore in the class name is completely optional, serving mainly as a convenience for accessing templates stored in subfolders.

Ideally, this would be denoted with dot notation, eg: `window.App.Views.Metrics.ShowView`, but this is complicated to implement and would require much more code than what's in this commit. It may well be worth investigating this later, but adding this commit now allows us to move ahead with grouping templates in subfolders.