This project is archived and is in readonly mode.

#2911 ✓wontfix
richmorin

template files have misleading names

Reported by richmorin | July 15th, 2009 @ 05:13 PM | in 2.x

Rails uses a number of template files with pathnames of the form

%r{^lib/rails_generator/generators/

  components/[^/]+/templates/[^/]+\.rb$}x

This may be confusing to some unwary readers, who look at the extension and expect to see plain Ruby code in the files. It also gets in the way of mechanized analysis tools (eg, MetricFu, YARD), because it requires them to pay attention to a Rails-specific naming convention.

I'd much rather see these template files follow a naming convention such as "*.rb.erb" (as used for View files).

Comments and changes to this ticket

  • richmorin

    richmorin July 15th, 2009 @ 05:15 PM

    Hmmm. Looks like I have a formatting botch. How about

    %r{^lib/rails_generator/generators/components/[^/]+/templates/[^/]+.rb$}

  • Michael Koziarski

    Michael Koziarski August 3rd, 2009 @ 06:14 AM

    • State changed from “new” to “wontfix”

    the directory name is 'templates' and it seems unnecessary to move them around for folks running metrics on rails itself.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages