Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7651: fix_rhtml_references.diff

File fix_rhtml_references.diff, 1.2 kB (added by jeremymcanally, 3 years ago)

Fixes last documentation reference and a small bug.

  • railties/lib/rails_generator/base.rb

    old new  
    3232  #         controller.rb 
    3333  #         functional_test.rb 
    3434  #         helper.rb 
    35   #         view.rhtml 
     35  #         view.erb 
    3636  # 
    3737  # The directory name (+controller+) matches the name of the generator file 
    3838  # (controller_generator.rb) and class (+ControllerGenerator+). The files 
  • railties/lib/tasks/annotations.rake

    old new  
    3030 
    3131      if File.directory?(item) 
    3232        results.update(find_in(item)) 
    33       elsif item =~ /\.r(?:b|xml|js)$/ 
     33      elsif item =~ /\.r(?:b|xml|js)$/ || item =~ /\.builder$/ 
    3434        results.update(extract_annotations_from(item, /#\s*(#{tag}):?\s*(.*)$/)) 
    35       elsif item =~ /\.rhtml$/ 
     35      elsif item =~ /\.rhtml$/ || item =~ /\.erb$/ 
    3636        results.update(extract_annotations_from(item, /<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/)) 
    3737      end 
    3838    end