Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixes generation of index and credits page

  • Loading branch information...
commit 50be5f039b310b61991c5e1de2b52c32564227b3 1 parent 836b778
@fxn fxn authored
View
6 railties/guides/rails_guides/generator.rb
@@ -18,7 +18,7 @@ def initialize(output = nil)
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 @@ def generate
end
def generate_guide(guide)
- guide =~ /(.*?)(\.erb)?\.textile/
+ guide =~ /(.*?)\.textile(?:\.erb)?$/
name = $1
puts "Generating #{name}"
@@ -46,7 +46,7 @@ def generate_guide(guide)
@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)
View
0  railties/guides/source/credits.erb.textile → railties/guides/source/credits.textile.erb
File renamed without changes
View
0  railties/guides/source/index.erb.textile → railties/guides/source/index.textile.erb
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.