mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fixes generation of index and credits page
This commit is contained in:
parent
836b7787f5
commit
50be5f039b
3 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue