From b1e2d7b96842f5b8b2a8fe911a6d31626c01effc Mon Sep 17 00:00:00 2001 From: Alvaro Pereyra Date: Sat, 1 Dec 2012 15:35:04 -0500 Subject: Cleans and removes 'Examples' tag [ci skip] --- activerecord/lib/active_record/autosave_association.rb | 2 -- activerecord/lib/active_record/integration.rb | 2 -- activerecord/lib/active_record/query_cache.rb | 2 ++ activerecord/lib/active_record/querying.rb | 7 ++----- 4 files changed, 4 insertions(+), 9 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index 907fe70522..704998301c 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -32,8 +32,6 @@ module ActiveRecord # autosave callbacks are executed. Placing your callbacks after # associations is usually a good practice. # - # == Examples - # # === One-to-one Example # # class Post diff --git a/activerecord/lib/active_record/integration.rb b/activerecord/lib/active_record/integration.rb index 23c272ef12..7bdc1bd4c6 100644 --- a/activerecord/lib/active_record/integration.rb +++ b/activerecord/lib/active_record/integration.rb @@ -29,8 +29,6 @@ module ActiveRecord # Returns a cache key that can be used to identify this record. # - # ==== Examples - # # Product.new.cache_key # => "products/new" # Product.find(5).cache_key # => "products/5" (updated_at not available) # Person.find(5).cache_key # => "people/5-20071224150000" (updated_at available) diff --git a/activerecord/lib/active_record/query_cache.rb b/activerecord/lib/active_record/query_cache.rb index 38e18b32a4..2cf75bcfc4 100644 --- a/activerecord/lib/active_record/query_cache.rb +++ b/activerecord/lib/active_record/query_cache.rb @@ -4,6 +4,7 @@ module ActiveRecord class QueryCache module ClassMethods # Enable the query cache within the block if Active Record is configured. + # If it's not, it willl execute the given block. def cache(&block) if ActiveRecord::Base.connected? connection.cache(&block) @@ -13,6 +14,7 @@ module ActiveRecord end # Disable the query cache within the block if Active Record is configured. + # If it's not, it willl execute the given block. def uncached(&block) if ActiveRecord::Base.connected? connection.uncached(&block) diff --git a/activerecord/lib/active_record/querying.rb b/activerecord/lib/active_record/querying.rb index 45f6a78428..5ddcaee6be 100644 --- a/activerecord/lib/active_record/querying.rb +++ b/activerecord/lib/active_record/querying.rb @@ -26,14 +26,13 @@ module ActiveRecord # MySQL specific terms will lock you to using that particular database engine or require you to # change your call if you switch engines. # - # ==== Examples # # A simple SQL query spanning multiple tables # Post.find_by_sql "SELECT p.title, c.author FROM posts p, comments c WHERE p.id = c.post_id" - # > [#"Ruby Meetup", "first_name"=>"Quentin"}>, ...] + # # => [#"Ruby Meetup", "first_name"=>"Quentin"}>, ...] # # # You can use the same string replacement techniques as you can with ActiveRecord#find # Post.find_by_sql ["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date] - # > [#"The Cheap Man Buys Twice"}>, ...] + # # => [#"The Cheap Man Buys Twice"}>, ...] def find_by_sql(sql, binds = []) logging_query_plan do result_set = connection.select_all(sanitize_sql(sql), "#{name} Load", binds) @@ -57,8 +56,6 @@ module ActiveRecord # # * +sql+ - An SQL statement which should return a count query from the database, see the example below. # - # ==== Examples - # # Product.count_by_sql "SELECT COUNT(*) FROM sales s, customers c WHERE s.customer_id = c.id" def count_by_sql(sql) logging_query_plan do -- cgit v1.2.3