diff options
author | Xavier Noria <fxn@hashref.com> | 2009-09-02 20:47:15 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2009-09-02 20:47:15 +0200 |
commit | 50be5f039b310b61991c5e1de2b52c32564227b3 (patch) | |
tree | fa9052892ee12933ac7bdc427a366aaea8b8d87c /railties/guides/rails_guides | |
parent | 836b7787f593cd4283d22d9cd1c5c575c8bd8e97 (diff) | |
download | rails-50be5f039b310b61991c5e1de2b52c32564227b3.tar.gz rails-50be5f039b310b61991c5e1de2b52c32564227b3.tar.bz2 rails-50be5f039b310b61991c5e1de2b52c32564227b3.zip |
fixes generation of index and credits page
Diffstat (limited to 'railties/guides/rails_guides')
-rw-r--r-- | railties/guides/rails_guides/generator.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb index a9467cdf80..341f570251 100644 --- a/railties/guides/rails_guides/generator.rb +++ b/railties/guides/rails_guides/generator.rb @@ -18,7 +18,7 @@ module RailsGuides end def generate - guides = Dir.entries(view_path).find_all {|g| g =~ /textile$/ } + guides = Dir.entries(view_path).find_all {|g| g =~ /\.textile(?:\.erb)?$/ } if ENV["ONLY"] only = ENV["ONLY"].split(",").map{|x| x.strip }.map {|o| "#{o}.textile" } @@ -36,7 +36,7 @@ module RailsGuides end def generate_guide(guide) - guide =~ /(.*?)(\.erb)?\.textile/ + guide =~ /(.*?)\.textile(?:\.erb)?$/ name = $1 puts "Generating #{name}" @@ -46,7 +46,7 @@ module RailsGuides @view = ActionView::Base.new(view_path) @view.extend(Helpers) - if guide =~ /\.erb\.textile/ + if guide =~ /\.textile\.erb$/ # Generate the erb pages with textile formatting - e.g. index/authors result = view.render(:layout => 'layout', :file => guide) f.write textile(result) |