mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix nodocs
This commit is contained in:
parent
120861c023
commit
94dcbe8115
5 changed files with 11 additions and 11 deletions
|
@ -70,7 +70,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
class HasManyThroughNestedAssociationsAreReadonly < ActiveRecordError #:nodoc
|
||||
class HasManyThroughNestedAssociationsAreReadonly < ActiveRecordError #:nodoc:
|
||||
def initialize(owner, reflection)
|
||||
super("Cannot modify association '#{owner.class.name}##{reflection.name}' because it goes through more than one other association.")
|
||||
end
|
||||
|
|
|
@ -130,7 +130,7 @@ module ActiveRecord
|
|||
#
|
||||
# In order to get around this problem, #transaction will emulate the effect
|
||||
# of nested transactions, by using savepoints:
|
||||
# http://dev.mysql.com/doc/refman/5.0/en/savepoints.html
|
||||
# http://dev.mysql.com/doc/refman/5.0/en/savepoint.html
|
||||
# Savepoints are supported by MySQL and PostgreSQL, but not SQLite3.
|
||||
#
|
||||
# It is safe to call this method if a database transaction is already open,
|
||||
|
@ -341,7 +341,7 @@ module ActiveRecord
|
|||
|
||||
# Send a rollback message to all records after they have been rolled back. If rollback
|
||||
# is false, only rollback records since the last save point.
|
||||
def rollback_transaction_records(rollback) #:nodoc
|
||||
def rollback_transaction_records(rollback)
|
||||
if rollback
|
||||
records = @_current_transaction_records.flatten
|
||||
@_current_transaction_records.clear
|
||||
|
@ -361,7 +361,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
# Send a commit message to all records after they have been committed.
|
||||
def commit_transaction_records #:nodoc
|
||||
def commit_transaction_records
|
||||
records = @_current_transaction_records.flatten
|
||||
@_current_transaction_records.clear
|
||||
unless records.blank?
|
||||
|
|
|
@ -301,7 +301,7 @@ module ActiveRecord
|
|||
protected
|
||||
|
||||
# Save the new record state and id of a record so it can be restored later if a transaction fails.
|
||||
def remember_transaction_record_state #:nodoc
|
||||
def remember_transaction_record_state #:nodoc:
|
||||
@_start_transaction_state ||= {}
|
||||
@_start_transaction_state[:id] = id if has_attribute?(self.class.primary_key)
|
||||
unless @_start_transaction_state.include?(:new_record)
|
||||
|
@ -314,7 +314,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
# Clear the new record state and id of a record.
|
||||
def clear_transaction_record_state #:nodoc
|
||||
def clear_transaction_record_state #:nodoc:
|
||||
if defined?(@_start_transaction_state)
|
||||
@_start_transaction_state[:level] = (@_start_transaction_state[:level] || 0) - 1
|
||||
remove_instance_variable(:@_start_transaction_state) if @_start_transaction_state[:level] < 1
|
||||
|
@ -322,7 +322,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
# Restore the new record state and id of a record that was previously saved by a call to save_record_state.
|
||||
def restore_transaction_record_state(force = false) #:nodoc
|
||||
def restore_transaction_record_state(force = false) #:nodoc:
|
||||
if defined?(@_start_transaction_state)
|
||||
@_start_transaction_state[:level] = (@_start_transaction_state[:level] || 0) - 1
|
||||
if @_start_transaction_state[:level] < 1
|
||||
|
@ -341,12 +341,12 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
# Determine if a record was created or destroyed in a transaction. State should be one of :new_record or :destroyed.
|
||||
def transaction_record_state(state) #:nodoc
|
||||
def transaction_record_state(state) #:nodoc:
|
||||
@_start_transaction_state[state] if defined?(@_start_transaction_state)
|
||||
end
|
||||
|
||||
# Determine if a transaction included an action for :create, :update, or :destroy. Used in filtering callbacks.
|
||||
def transaction_include_action?(action) #:nodoc
|
||||
def transaction_include_action?(action) #:nodoc:
|
||||
case action
|
||||
when :create
|
||||
transaction_record_state(:new_record)
|
||||
|
|
|
@ -44,7 +44,7 @@ class String
|
|||
end
|
||||
end
|
||||
|
||||
def is_utf8? #:nodoc
|
||||
def is_utf8?
|
||||
case encoding
|
||||
when Encoding::UTF_8
|
||||
valid_encoding?
|
||||
|
|
|
@ -30,7 +30,7 @@ module Rails
|
|||
#
|
||||
# config.generators.colorize_logging = false
|
||||
#
|
||||
def generators #:nodoc
|
||||
def generators #:nodoc:
|
||||
@generators ||= Rails::Configuration::Generators.new
|
||||
yield(@generators) if block_given?
|
||||
@generators
|
||||
|
|
Loading…
Reference in a new issue