From 062d1f718943925debd3c4aae45a4b5e15b40632 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Thu, 11 Apr 2013 12:33:36 -0500 Subject: Fix StatementCache docs format [ci skip] --- activerecord/lib/active_record/statement_cache.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/activerecord/lib/active_record/statement_cache.rb b/activerecord/lib/active_record/statement_cache.rb index 8c4b4f666b..731871d643 100644 --- a/activerecord/lib/active_record/statement_cache.rb +++ b/activerecord/lib/active_record/statement_cache.rb @@ -3,15 +3,15 @@ module ActiveRecord # Statement cache is used to cache a single statement in order to avoid creating the AST again. # Initializing the cache is done by passing the statement in the initialization block: # - # cache = ActiveRecord::StatementCache.new do - # Book.where(name: "my book").limit(100) - # end + # cache = ActiveRecord::StatementCache.new do + # Book.where(name: "my book").limit(100) + # end # # The cached statement is executed by using the +execute+ method: # - # cache.execute + # cache.execute # - # The relation returned by yield is cached, and for each +execute+ call the cached relation gets duped. + # The relation returned by +yield+ is cached, and for each +execute+ call the cached relation gets duped. # Database is queried when +to_a+ is called on the relation. class StatementCache def initialize -- cgit v1.2.3 From 69a87d5ada9dd07ed95d16c11767c8fb73e81051 Mon Sep 17 00:00:00 2001 From: Benjamin Tan Wei Hao Date: Fri, 12 Apr 2013 10:14:51 +0800 Subject: Fix links containing stray colons --- guides/source/debugging_rails_applications.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guides/source/debugging_rails_applications.md b/guides/source/debugging_rails_applications.md index df7b113eb1..8f1d2922ac 100644 --- a/guides/source/debugging_rails_applications.md +++ b/guides/source/debugging_rails_applications.md @@ -655,10 +655,10 @@ Plugins for Debugging There are some Rails plugins to help you to find errors and debug your application. Here is a list of useful plugins for debugging: -* [Footnotes](https://github.com/josevalim/rails-footnotes:) Every Rails page has footnotes that give request information and link back to your source via TextMate. -* [Query Trace](https://github.com/ntalbott/query_trace/tree/master:) Adds query origin tracing to your logs. -* [Query Reviewer](https://github.com/nesquena/query_reviewer:) This rails plugin not only runs "EXPLAIN" before each of your select queries in development, but provides a small DIV in the rendered output of each page with the summary of warnings for each query that it analyzed. -* [Exception Notifier](https://github.com/smartinez87/exception_notification/tree/master:) Provides a mailer object and a default set of templates for sending email notifications when errors occur in a Rails application. +* [Footnotes](https://github.com/josevalim/rails-footnotes) Every Rails page has footnotes that give request information and link back to your source via TextMate. +* [Query Trace](https://github.com/ntalbott/query_trace/tree/master) Adds query origin tracing to your logs. +* [Query Reviewer](https://github.com/nesquena/query_reviewer) This rails plugin not only runs "EXPLAIN" before each of your select queries in development, but provides a small DIV in the rendered output of each page with the summary of warnings for each query that it analyzed. +* [Exception Notifier](https://github.com/smartinez87/exception_notification/tree/master) Provides a mailer object and a default set of templates for sending email notifications when errors occur in a Rails application. References ---------- -- cgit v1.2.3 From 87735d3a281bcb1eb968855678dce6a0e7d7f677 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Fri, 12 Apr 2013 00:16:49 -0500 Subject: minor edit on StatementCache documentation [ci skip] --- activerecord/lib/active_record/statement_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/statement_cache.rb b/activerecord/lib/active_record/statement_cache.rb index 731871d643..dd4ee0c4a0 100644 --- a/activerecord/lib/active_record/statement_cache.rb +++ b/activerecord/lib/active_record/statement_cache.rb @@ -11,7 +11,7 @@ module ActiveRecord # # cache.execute # - # The relation returned by +yield+ is cached, and for each +execute+ call the cached relation gets duped. + # The relation returned by the block is cached, and for each +execute+ call the cached relation gets duped. # Database is queried when +to_a+ is called on the relation. class StatementCache def initialize -- cgit v1.2.3 From b12367348d9f61409c0e90e7a58c691e1b927006 Mon Sep 17 00:00:00 2001 From: Jonathan Roes Date: Fri, 12 Apr 2013 10:50:57 -0300 Subject: Update to Ryan's new book per his suggestion See https://github.com/lifo/docrails/commit/edeb98c2745cbf29725eca87332cefb4f273986a#commitcomment-2995521 --- guides/source/credits.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/credits.html.erb b/guides/source/credits.html.erb index d436deb832..34be07ef81 100644 --- a/guides/source/credits.html.erb +++ b/guides/source/credits.html.erb @@ -28,7 +28,7 @@ Ruby on Rails Guides: Credits

Rails Guides Authors

<%= author('Ryan Bigg', 'radar', 'radar.png') do %> -Ryan Bigg works as the Community Manager at Spree Commerce and has been working with Rails since 2006. He's the author of Multi Tenancy With Rails and co-author of Rails 3 in Action. He's written many gems which can be seen on his GitHub page and he also tweets prolifically as @ryanbigg. + Ryan Bigg works as the Community Manager at Spree Commerce and has been working with Rails since 2006. He's the author of Multi Tenancy With Rails and co-author of Rails 4 in Action. He's written many gems which can be seen on his GitHub page and he also tweets prolifically as @ryanbigg. <% end %> <%= author('Oscar Del Ben', 'oscardelben', 'oscardelben.jpg') do %> -- cgit v1.2.3 From 9cb12265d8a08c219c82e4e4d305a6d60b0af35c Mon Sep 17 00:00:00 2001 From: Viktar Basharymau Date: Fri, 12 Apr 2013 17:35:02 +0300 Subject: Fix a typo --- actionpack/lib/action_view/template/resolver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index 6b9b0a826b..3304605c1a 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -47,7 +47,7 @@ module ActionView NAME_BLOCK = lambda {|cache, name| cache[name] = SmallCache.new(&PREFIX_BLOCK)} KEY_BLOCK = lambda {|cache, key| cache[key] = SmallCache.new(&NAME_BLOCK)} - # usually a majority of template look ups return nothing, use this canonical preallocated array to safe memory + # usually a majority of template look ups return nothing, use this canonical preallocated array to save memory NO_TEMPLATES = [].freeze def initialize -- cgit v1.2.3 From 8f199d8e01afa3968bfca1dd30ea58b3c1090402 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Fri, 12 Apr 2013 23:51:16 -0500 Subject: fix :nodoc: mark on AR::AttributeMethods::Serialization [ci skip] --- activerecord/lib/active_record/attribute_methods/serialization.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb index ae49fd4b88..7f1ebab4cd 100644 --- a/activerecord/lib/active_record/attribute_methods/serialization.rb +++ b/activerecord/lib/active_record/attribute_methods/serialization.rb @@ -93,10 +93,10 @@ module ActiveRecord # This is only added to the model when serialize is called, which # ensures we do not make things slower when serialization is not used. - module Behavior #:nodoc: + module Behavior # :nodoc: extend ActiveSupport::Concern - module ClassMethods + module ClassMethods # :nodoc: def initialize_attributes(attributes, options = {}) serialized = (options.delete(:serialized) { true }) ? :serialized : :unserialized super(attributes, options) -- cgit v1.2.3 From e890a69500531d5fcca0ad6617ace044ee62bf93 Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Sat, 13 Apr 2013 11:36:50 -0400 Subject: Corrected paramter to parameter --- activesupport/lib/active_support/core_ext/string/inflections.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index 6522145572..0b506a6030 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -41,7 +41,7 @@ class String # # If the optional parameter +locale+ is specified, # the word will be singularized as a word of that language. - # By default, this paramter is set to :en. + # By default, this parameter is set to :en. # You must define your own inflection rules for languages other than English. # # 'posts'.singularize # => "post" -- cgit v1.2.3