Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Some fixes in rails guides generation

* Passing edge information to the views fixes the lack of the edge badge
and sets the appropriate welcome page on edgeguides.rubyonrails.org.
* Changes in the welcome message to hyper link the rails tree based on
the version.
* Mention the Amazon url from where kindlegen can be downloaded.
  • Loading branch information...
commit 68564eb2a1f704fe9fe5101df6c88f738124fed7 1 parent 7a3121b
@vijaydev vijaydev authored
View
6 railties/guides/rails_guides/generator.rb
@@ -49,8 +49,8 @@
#
# KINDLE
# Set to "1" to generate the .mobi with all the guides. The kindlegen
-# executable must be in your PATH. Google for it if you do not have it
-# locally, it is available from Amazon for free.
+# executable must be in your PATH. You can get it for free from
+# http://www.amazon.com/kindlepublishing
#
# ---------------------------------------------------------------------------
@@ -199,7 +199,7 @@ def generate_guide(guide, output_file)
layout = kindle? ? 'kindle/layout' : 'layout'
File.open(output_path, 'w') do |f|
- view = ActionView::Base.new(source_dir, :version => @version, :mobi => "kindle/#{mobi}")
+ view = ActionView::Base.new(source_dir, :edge => @edge, :version => @version, :mobi => "kindle/#{mobi}")
view.extend(Helpers)
if guide =~ /\.(\w+)\.erb$/
View
14 railties/guides/source/_welcome.html.erb
@@ -1,21 +1,19 @@
-<h2>Ruby on Rails Guides (<%= @version %>)</h2>
+<h2>Ruby on Rails Guides</h2>
<% if @edge %>
<p>
- These are <b>Edge Guides</b>, based on the current
- <a href="https://github.com/rails/rails/tree/master">master branch</a>.
+ These are <b>Edge Guides</b>, based on the current <a href="https://github.com/rails/rails/tree/<%= @version %>">master</a> branch.
</p>
<p>
- If you are looking for the ones for the stable version please check
+ If you are looking for the ones for the stable version, please check
<a href="http://guides.rubyonrails.org">http://guides.rubyonrails.org</a> instead.
</p>
<% else %>
<p>
- These are the new guides for Rails 3. The guides for Rails 2.3 are still available
- at <a href="http://guides.rubyonrails.org/v2.3.11/">http://guides.rubyonrails.org/v2.3.11/</a>.
+ These are the new guides for Rails 3.1 based on <a href="https://github.com/rails/rails/tree/<%= @version %>"><%= @version %></a>.
+ These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together.
</p>
<% end %>
<p>
- These guides are designed to make you immediately productive with Rails,
- and to help you understand how all of the pieces fit together.
+ The guides for Rails 2.3.x are available at <a href="http://guides.rubyonrails.org/v2.3.11/">http://guides.rubyonrails.org/v2.3.11/</a>.
</p>
Please sign in to comment.
Something went wrong with that request. Please try again.