Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

template files have misleading names

#2911

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).

Reported by richmorin · July 15th, 2009 @ 05:13 PM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. richmorin
    richmorin

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

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

    July 15th, 2009 @ 05:15 PM

  2. Michael Koziarski
    Michael Koziarski
    • 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.

    August 3rd, 2009 @ 06:14 AM