diff options
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/rails_guides/generator.rb | 6 | ||||
-rw-r--r-- | railties/guides/source/_welcome.html.erb | 12 | ||||
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 14 |
3 files changed, 9 insertions, 23 deletions
diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb index b5f1a471ef..49ad8f7769 100644 --- a/railties/guides/rails_guides/generator.rb +++ b/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 @@ module RailsGuides 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$/ diff --git a/railties/guides/source/_welcome.html.erb b/railties/guides/source/_welcome.html.erb index a5ceeee5f2..bcbb49a0ec 100644 --- a/railties/guides/source/_welcome.html.erb +++ b/railties/guides/source/_welcome.html.erb @@ -2,20 +2,18 @@ <% 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> diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index e912de974a..1c82a2941f 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -822,7 +822,7 @@ M.name # => "M" N = Module.new N.name # => "N" -Module.new.name # => "" in 1.8, nil in 1.9 +Module.new.name # => nil </ruby> You can check whether a module has a name with the predicate +anonymous?+: @@ -935,18 +935,6 @@ In the previous example the macro generates +avatar_size+ rather than +size+. NOTE: Defined in +active_support/core_ext/module/delegation.rb+ -h4. Method Names - -The builtin methods +instance_methods+ and +methods+ return method names as strings or symbols depending on the Ruby version. Active Support defines +instance_method_names+ and +method_names+ to be equivalent to them, respectively, but always getting strings back. - -For example, +ActionView::Helpers::FormBuilder+ knows this array difference is going to work no matter the Ruby version: - -<ruby> -self.field_helpers = (FormHelper.instance_method_names - ['form_for']) -</ruby> - -NOTE: Defined in +active_support/core_ext/module/method_names.rb+ - h4. Redefining Methods There are cases where you need to define a method with +define_method+, but don't know whether a method with that name already exists. If it does, a warning is issued if they are enabled. No big deal, but not clean either. |