mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Some style changes
This commit is contained in:
@@ -8,7 +8,7 @@ module ActiveSupport
|
|||||||
# filter or modify the paths of any lines of the backtrace, you can call BacktraceCleaner#remove_filters! These two methods
|
# filter or modify the paths of any lines of the backtrace, you can call BacktraceCleaner#remove_filters! These two methods
|
||||||
# will give you a completely untouched backtrace.
|
# will give you a completely untouched backtrace.
|
||||||
#
|
#
|
||||||
# Example:
|
# ==== Example:
|
||||||
#
|
#
|
||||||
# bc = BacktraceCleaner.new
|
# bc = BacktraceCleaner.new
|
||||||
# bc.add_filter { |line| line.gsub(Rails.root, '') }
|
# bc.add_filter { |line| line.gsub(Rails.root, '') }
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ module ActiveSupport
|
|||||||
# Allows you to add shortcut so that you don't have to refer to attribute through config.
|
# 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.
|
# Also look at the example for config to contrast.
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# ==== Example
|
||||||
|
#
|
||||||
# class User
|
# class User
|
||||||
# include ActiveSupport::Configurable
|
# include ActiveSupport::Configurable
|
||||||
# config_accessor :allowed_access
|
# config_accessor :allowed_access
|
||||||
@@ -65,6 +68,9 @@ module ActiveSupport
|
|||||||
|
|
||||||
# Reads and writes attributes from a configuration <tt>OrderedHash</tt>.
|
# Reads and writes attributes from a configuration <tt>OrderedHash</tt>.
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# ==== Example
|
||||||
|
#
|
||||||
# require 'active_support/configurable'
|
# require 'active_support/configurable'
|
||||||
#
|
#
|
||||||
# class User
|
# class User
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
require 'active_support/core_ext/hash/keys'
|
require 'active_support/core_ext/hash/keys'
|
||||||
|
|
||||||
# This class has dubious semantics and we only have it so that
|
# This class has dubious semantics and we only have it so that
|
||||||
# people can write params[:key] instead of params['key']
|
# people can write <tt>params[:key]</tt> instead of <tt>params['key']</tt>
|
||||||
# and they get the same value for both keys.
|
# and they get the same value for both keys.
|
||||||
|
|
||||||
module ActiveSupport
|
module ActiveSupport
|
||||||
@@ -109,7 +109,7 @@ module ActiveSupport
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second.
|
# Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second.
|
||||||
# This overloaded definition prevents returning a regular hash, if reverse_merge is called on a HashWithDifferentAccess.
|
# This overloaded definition prevents returning a regular hash, if reverse_merge is called on a <tt>HashWithDifferentAccess</tt>.
|
||||||
def reverse_merge(other_hash)
|
def reverse_merge(other_hash)
|
||||||
super self.class.new_from_hash_copying_default(other_hash)
|
super self.class.new_from_hash_copying_default(other_hash)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ module I18n
|
|||||||
@reloader ||= ActiveSupport::FileUpdateChecker.new([]){ I18n.reload! }
|
@reloader ||= ActiveSupport::FileUpdateChecker.new([]){ I18n.reload! }
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add I18n::Railtie.reloader to ActionDispatch callbacks. Since, at this
|
# Add <tt>I18n::Railtie.reloader</tt> to ActionDispatch callbacks. Since, at this
|
||||||
# point, no path was added to the reloader, I18n.reload! is not triggered
|
# point, no path was added to the reloader, I18n.reload! is not triggered
|
||||||
# on to_prepare callbacks. This will only happen on the config.after_initialize
|
# on to_prepare callbacks. This will only happen on the config.after_initialize
|
||||||
# callback below.
|
# callback below.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ module ActiveSupport
|
|||||||
#
|
#
|
||||||
# The cipher text and initialization vector are base64 encoded and returned to you.
|
# The cipher text and initialization vector are base64 encoded and returned to you.
|
||||||
#
|
#
|
||||||
# This can be used in situations similar to the MessageVerifier, but where you don't
|
# This can be used in situations similar to the <tt>MessageVerifier</tt>, but where you don't
|
||||||
# want users to be able to determine the value of the payload.
|
# want users to be able to determine the value of the payload.
|
||||||
class MessageEncryptor
|
class MessageEncryptor
|
||||||
class InvalidMessage < StandardError; end
|
class InvalidMessage < StandardError; end
|
||||||
|
|||||||
Reference in New Issue
Block a user