From 67c40160d384037d664952cee808a49104bdc627 Mon Sep 17 00:00:00 2001 From: "Ryan L. Cross" Date: Sun, 24 Oct 2010 19:17:49 -0700 Subject: Corrected typo and wording. --- activesupport/lib/active_support/cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 9098ffbfec..9771ca966f 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -214,7 +214,7 @@ module ActiveSupport # cache.write(key, value, :expire_in => 1.minute) # Set a lower value for one entry # # Setting :race_condition_ttl is very useful in situations where a cache entry - # is used very frequently unver heavy load. If a cache expires and due to heavy load + # is used very frequently and is under heavy load. If a cache expires and due to heavy load # seven different processes will try to read data natively and then they all will try to # write to cache. To avoid that case the first process to find an expired cache entry will # bump the cache expiration time by the value set in :race_condition_ttl. Yes -- cgit v1.2.3 From f28916194cc19759dd6b1ce4f22ef59b49f0c8f8 Mon Sep 17 00:00:00 2001 From: Aditya Sanghi Date: Sat, 27 Nov 2010 15:20:46 +0530 Subject: Resolves LH #6063, should be :expires_in not :expire_in --- activesupport/lib/active_support/cache.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 9098ffbfec..d31dad6bc7 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -210,8 +210,8 @@ module ActiveSupport # be specified as an option to the construction in which call all entries will be # affected. Or it can be supplied to the +fetch+ or +write+ method for just one entry. # - # cache = ActiveSupport::Cache::MemoryStore.new(:expire_in => 5.minutes) - # cache.write(key, value, :expire_in => 1.minute) # Set a lower value for one entry + # cache = ActiveSupport::Cache::MemoryStore.new(:expires_in => 5.minutes) + # cache.write(key, value, :expires_in => 1.minute) # Set a lower value for one entry # # Setting :race_condition_ttl is very useful in situations where a cache entry # is used very frequently unver heavy load. If a cache expires and due to heavy load -- cgit v1.2.3 From aa1ac1ca8cf9557dae72604a48de1f0e58515b40 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Tue, 30 Nov 2010 09:44:12 -0500 Subject: Add comment for config_accessor method --- activesupport/lib/active_support/configurable.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/configurable.rb b/activesupport/lib/active_support/configurable.rb index 58ed37b018..644db0b205 100644 --- a/activesupport/lib/active_support/configurable.rb +++ b/activesupport/lib/active_support/configurable.rb @@ -38,6 +38,18 @@ module ActiveSupport yield config end + # Allows you to add shortcut so that you don't have to refer to attribute through config. + # Also look at the example for config to contrast. + # + # class User + # include ActiveSupport::Configurable + # config_accessor :allowed_access + # end + # + # user = User.new + # user.allowed_access = true + # user.allowed_access # => true + # def config_accessor(*names) names.each do |name| code, line = <<-RUBY, __LINE__ + 1 -- cgit v1.2.3 From 7f1c794a11c463f4b50d46180932fa4a62e369a5 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Fri, 3 Dec 2010 13:29:02 +1100 Subject: Remove extra f --- activesupport/lib/active_support/dependencies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 787437c49a..dab6fdbac6 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -331,7 +331,7 @@ module ActiveSupport #:nodoc: if load? log "loading #{file_name}" - # Enable warnings iff this file has not been loaded before and + # Enable warnings if this file has not been loaded before and # warnings_on_first_load is set. load_args = ["#{file_name}.rb"] load_args << const_path unless const_path.nil? -- cgit v1.2.3