diff options
author | Xavier Noria <fxn@hashref.com> | 2011-06-06 22:23:30 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-06-06 22:23:30 +0200 |
commit | 5e21247131fa7d5484190c9a71b74f9d3f090684 (patch) | |
tree | 5eee39fcabb952cafd513caf7e67943bc6b26e98 /activerecord/lib | |
parent | 38ad6bb2f566202dd522a0cf31a55a746f122d53 (diff) | |
parent | 689e12b828665b7b2cfcda85d46249c5cf2aa713 (diff) | |
download | rails-5e21247131fa7d5484190c9a71b74f9d3f090684.tar.gz rails-5e21247131fa7d5484190c9a71b74f9d3f090684.tar.bz2 rails-5e21247131fa7d5484190c9a71b74f9d3f090684.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
activerecord/RUNNING_UNIT_TESTS
Diffstat (limited to 'activerecord/lib')
5 files changed, 13 insertions, 13 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 3acfa5f729..2cbfa42718 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -452,12 +452,12 @@ module ActiveRecord # end # # Some extensions can only be made to work with knowledge of the association's internals. - # Extensions can access relevant state using the following methods (where 'items' is the + # Extensions can access relevant state using the following methods (where +items+ is the # name of the association): # - # * +record.association(:items).owner+ - Returns the object the association is part of. - # * +record.association(:items).reflection+ - Returns the reflection object that describes the association. - # * +record.association(:items).target+ - Returns the associated object for +belongs_to+ and +has_one+, or + # * <tt>record.association(:items).owner</tt> - Returns the object the association is part of. + # * <tt>record.association(:items).reflection</tt> - Returns the reflection object that describes the association. + # * <tt>record.association(:items).target</tt> - Returns the associated object for +belongs_to+ and +has_one+, or # the collection of associated objects for +has_many+ and +has_and_belongs_to_many+. # # === Association Join Models diff --git a/activerecord/lib/active_record/attribute_methods/primary_key.rb b/activerecord/lib/active_record/attribute_methods/primary_key.rb index 5f06452247..e3f221c773 100644 --- a/activerecord/lib/active_record/attribute_methods/primary_key.rb +++ b/activerecord/lib/active_record/attribute_methods/primary_key.rb @@ -48,7 +48,7 @@ module ActiveRecord end attr_accessor :original_primary_key - + # Attribute writer for the primary key column def primary_key=(value) @quoted_primary_key = nil diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 640111096d..de26b21f1a 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -53,7 +53,7 @@ module ActiveRecord # # This migration will add a boolean flag to the accounts table and remove it # if you're backing out of the migration. It shows how all migrations have - # two class methods +up+ and +down+ that describes the transformations + # two methods +up+ and +down+ that describes the transformations # required to implement or remove the migration. These methods can consist # of both the migration specific methods like add_column and remove_column, # but may also contain regular Ruby code for generating data needed for the diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb index ed8e5ae140..f01e94169f 100644 --- a/activerecord/lib/active_record/migration/command_recorder.rb +++ b/activerecord/lib/active_record/migration/command_recorder.rb @@ -1,6 +1,6 @@ module ActiveRecord class Migration - # ActiveRecord::Migration::CommandRecorder records commands done during + # <tt>ActiveRecord::Migration::CommandRecorder</tt> records commands done during # a migration and knows how to reverse those commands. The CommandRecorder # knows how to invert the following commands: # @@ -23,7 +23,7 @@ module ActiveRecord # record +command+. +command+ should be a method name and arguments. # For example: # - # recorder.record(:method_name, [:arg1, arg2]) + # recorder.record(:method_name, [:arg1, :arg2]) def record(*command) @commands << command end @@ -34,7 +34,7 @@ module ActiveRecord # recorder.record(:rename_table, [:old, :new]) # recorder.inverse # => [:rename_table, [:new, :old]] # - # This method will raise an IrreversibleMigration exception if it cannot + # This method will raise an +IrreversibleMigration+ exception if it cannot # invert the +commands+. def inverse @commands.reverse.map { |name, args| @@ -50,9 +50,9 @@ module ActiveRecord [:create_table, :rename_table, :add_column, :remove_column, :rename_index, :rename_column, :add_index, :remove_index, :add_timestamps, :remove_timestamps, :change_column, :change_column_default].each do |method| class_eval <<-EOV, __FILE__, __LINE__ + 1 - def #{method}(*args) - record(:"#{method}", args) - end + def #{method}(*args) # def create_table(*args) + record(:"#{method}", args) # record(:create_table, args) + end # end EOV end diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index d363f36108..ae97a3f3ca 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -165,7 +165,7 @@ module ActiveRecord # writing, the only database that we're aware of that supports true nested # transactions, is MS-SQL. Because of this, Active Record emulates nested # transactions by using savepoints on MySQL and PostgreSQL. See - # http://dev.mysql.com/doc/refman/5.0/en/savepoints.html + # http://dev.mysql.com/doc/refman/5.0/en/savepoint.html # for more information about savepoints. # # === Callbacks |