public
Description: Ruby on Rails TextMate bundle [Learn it with PeepCode - http://peepcode.com/products/textmate-for-rails-2]
Homepage: http://groups.google.com/group/rubyonrails-textmate
Clone URL: git://github.com/drnic/ruby-on-rails-tmbundle.git
Click here to lend your support to: ruby-on-rails-tmbundle and make a donation at www.pledgie.com !
[Footnotes-edge] added html.erb view file type (thanks Giles Bowkett and 
George Anderson)

git-svn-id: 
http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%20on%20Rails.tmbundle
@8373 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
canadaduane (author)
Tue Oct 30 08:43:35 -0700 2007
commit  9f5b63bf08a6f5019523ee1761f6c6caef641a5a
tree    2078118328c1b53b57566f62f0d4e134053c2919
parent  899631e49b0317a04308b9a35da908b5157c0972
...
34
35
36
37
 
38
39
40
...
77
78
79
80
 
81
82
83
84
 
85
86
87
...
90
91
92
93
 
 
 
 
94
95
96
...
34
35
36
 
37
38
39
40
...
77
78
79
 
80
81
82
83
 
84
85
86
87
...
90
91
92
 
93
94
95
96
97
98
99
0
@@ -34,7 +34,7 @@ class FootnoteFilter
0
   
0
   def add_footnotes!
0
     if performed_render? and first_render?
0
- if ["haml", "rhtml", "rxhtml"].include?(template_extension) && (content_type =~ /html/ || content_type.nil?) && !xhr?
0
+ if ["html.erb", "haml", "rhtml", "rxhtml"].include?(template_extension) && (content_type =~ /html/ || content_type.nil?) && !xhr?
0
         # If the user would like to be responsible for the styles, let them opt out of the styling here
0
         insert_styles unless FootnoteFilter.no_style
0
         insert_footnotes
0
@@ -77,11 +77,11 @@ class FootnoteFilter
0
   end
0
   
0
   def template_path
0
- @template.first_render.sub(/\.(rhtml|rxhtml|rxml|rjs)$/, "")
0
+ @template.first_render.sub(/\.(html\.erb|rhtml|rxhtml|rxml|rjs)$/, "")
0
   end
0
   
0
   def template_extension
0
- @template.first_render.scan(/\.(rhtml|rxhtml|rxml|rjs)$/).flatten.first ||
0
+ @template.first_render.scan(/\.(html\.erb|rhtml|rxhtml|rxml|rjs)$/).flatten.first ||
0
     @template.pick_template_extension(template_path).to_s
0
   end
0
   
0
@@ -90,7 +90,10 @@ class FootnoteFilter
0
   end
0
   
0
   def layout_file_name
0
- File.expand_path(@template.send(:full_template_path, @controller.active_layout, "rhtml"))
0
+ ["html.erb", "rhtml"].each do |extension|
0
+ path = File.expand_path(@template.send(:full_template_path, @controller.active_layout, extension))
0
+ return path if File.exist?(path)
0
+ end
0
   end
0
   
0
   def content_type

Comments

    No one has commented yet.