From 1f62b1266275584c83add972aaad3db6ea8d5501 Mon Sep 17 00:00:00 2001 From: Geoffrey Roguelon Date: Tue, 15 May 2012 09:40:03 +0200 Subject: Fix an error in example in methods of instanciated fixtures. --- activerecord/lib/active_record/fixtures.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index c630af59f0..7e6512501c 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -83,7 +83,7 @@ module ActiveRecord # end # # test "find_alt_method_2" do - # assert_equal "Ruby on Rails", @rubyonrails.news + # assert_equal "Ruby on Rails", @rubyonrails.name # end # # In order to use these methods to access fixtured data within your testcases, you must specify one of the -- cgit v1.2.3 From b026f7e1fff3b8f7fdfa1a743f21ce236115b200 Mon Sep 17 00:00:00 2001 From: Peter Suschlik Date: Tue, 15 May 2012 15:37:18 +0200 Subject: Fix typo [ci skip] --- activerecord/lib/active_record/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 4ebdb04565..737f192731 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -127,7 +127,7 @@ module ActiveRecord object.is_a?(self) end - # Returns an instance of +Arel::Table+ loaded with the curent + # Returns an instance of +Arel::Table+ loaded with the current # table name # # class Post < ActiveRecord::Base -- cgit v1.2.3 From 8d7c38b858b0190ac56998f4a4baba250eaf1e4e Mon Sep 17 00:00:00 2001 From: Oscar Del Ben Date: Tue, 15 May 2012 20:38:41 -0700 Subject: Update docs in sqlite3 adapter --- .../connection_adapters/sqlite3_adapter.rb | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index 7b4be67131..43756f48e0 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -48,7 +48,7 @@ module ActiveRecord end end - # The SQLite3 adapter works SQLite 3.6.16 or newer + # The SQLite3 adapter works with SQLite 3.6.16 or newer, # with the sqlite3-ruby drivers (available as gem from https://rubygems.org/gems/sqlite3). # # Options: @@ -123,17 +123,17 @@ module ActiveRecord 'SQLite' end - # Returns true + # Returns true, since this connection adapter supports ddl transactions. def supports_ddl_transactions? true end - # Returns true if SQLite version is '3.6.8' or greater, false otherwise. + # Returns true if SQLite version supports savepoints, false otherwise. def supports_savepoints? sqlite_version >= '3.6.8' end - # Returns true, since this connection adapter supports prepared statement + # Returns true, since this connection adapter supports prepared statement. # caching. def supports_statement_cache? true @@ -144,7 +144,7 @@ module ActiveRecord true end - # Returns true. + # Returns true, since this connection adapter supports primary key. def supports_primary_key? #:nodoc: true end @@ -153,13 +153,12 @@ module ActiveRecord true end - # Returns true + # Returns true, since this connection adapter supports add column. def supports_add_column? true end - - # Disconnects from the database if already connected. Otherwise, this - # method does nothing. + + # Disconnects from the database if already connected. def disconnect! super clear_cache! @@ -171,16 +170,17 @@ module ActiveRecord @statements.clear end - # Returns true + # Returns true, since this connection adapter count distinct. def supports_count_distinct? #:nodoc: true end - # Returns true + # Returns true, since this connection adapter supports autoincrement. def supports_autoincrement? #:nodoc: true end + # Returns true, since this connection adapter supports def supports_index_sort_order? true end @@ -207,7 +207,7 @@ module ActiveRecord @connection.encoding.to_s end - # Returns true. + # Returns true, since this connection adapter supports explain. def supports_explain? true end -- cgit v1.2.3 From 0e07a80f5ab4b1dda1f4a6e373a4ef0b6a933c29 Mon Sep 17 00:00:00 2001 From: Alexey Vakhov Date: Wed, 16 May 2012 09:00:26 +0400 Subject: Update AR has_one association example --- activerecord/lib/active_record/associations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index c30e8e08b8..68f8bbeb1c 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -543,7 +543,7 @@ module ActiveRecord # end # # @group = Group.first - # @group.users.collect { |u| u.avatar }.flatten # select all avatars for all users in the group + # @group.users.collect { |u| u.avatar }.compact # select all avatars for all users in the group # @group.avatars # selects all avatars by going through the User join model. # # An important caveat with going through +has_one+ or +has_many+ associations on the -- cgit v1.2.3 From 6a1290064de328f427f423a2060cd135285fa77a Mon Sep 17 00:00:00 2001 From: Mark Rushakoff Date: Wed, 16 May 2012 13:17:09 -0700 Subject: Fix typos in docs for ActiveRecord::Core::arel_table [ci skip] --- activerecord/lib/active_record/core.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 737f192731..6a310bba51 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -127,12 +127,10 @@ module ActiveRecord object.is_a?(self) end - # Returns an instance of +Arel::Table+ loaded with the current - # table name + # Returns an instance of Arel::Table loaded with the current table name. # # class Post < ActiveRecord::Base # scope :published_and_commented, published.and(self.arel_table[:comments_count].gt(0)) - # end # end def arel_table @arel_table ||= Arel::Table.new(table_name, arel_engine) -- cgit v1.2.3 From b71a90060fb94709cceb3b2d80c3de6fd12a6e22 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Thu, 17 May 2012 17:11:53 +0530 Subject: Revert "Update docs in sqlite3 adapter" This reverts commit 8d7c38b858b0190ac56998f4a4baba250eaf1e4e. Reason: Lot of the additions aren't adding value. [ci skip] --- .../connection_adapters/sqlite3_adapter.rb | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index 43756f48e0..7b4be67131 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -48,7 +48,7 @@ module ActiveRecord end end - # The SQLite3 adapter works with SQLite 3.6.16 or newer, + # The SQLite3 adapter works SQLite 3.6.16 or newer # with the sqlite3-ruby drivers (available as gem from https://rubygems.org/gems/sqlite3). # # Options: @@ -123,17 +123,17 @@ module ActiveRecord 'SQLite' end - # Returns true, since this connection adapter supports ddl transactions. + # Returns true def supports_ddl_transactions? true end - # Returns true if SQLite version supports savepoints, false otherwise. + # Returns true if SQLite version is '3.6.8' or greater, false otherwise. def supports_savepoints? sqlite_version >= '3.6.8' end - # Returns true, since this connection adapter supports prepared statement. + # Returns true, since this connection adapter supports prepared statement # caching. def supports_statement_cache? true @@ -144,7 +144,7 @@ module ActiveRecord true end - # Returns true, since this connection adapter supports primary key. + # Returns true. def supports_primary_key? #:nodoc: true end @@ -153,12 +153,13 @@ module ActiveRecord true end - # Returns true, since this connection adapter supports add column. + # Returns true def supports_add_column? true end - - # Disconnects from the database if already connected. + + # Disconnects from the database if already connected. Otherwise, this + # method does nothing. def disconnect! super clear_cache! @@ -170,17 +171,16 @@ module ActiveRecord @statements.clear end - # Returns true, since this connection adapter count distinct. + # Returns true def supports_count_distinct? #:nodoc: true end - # Returns true, since this connection adapter supports autoincrement. + # Returns true def supports_autoincrement? #:nodoc: true end - # Returns true, since this connection adapter supports def supports_index_sort_order? true end @@ -207,7 +207,7 @@ module ActiveRecord @connection.encoding.to_s end - # Returns true, since this connection adapter supports explain. + # Returns true. def supports_explain? true end -- cgit v1.2.3