diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-12-17 13:25:16 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-12-17 13:25:46 -0200 |
commit | ff8510173017291e754e4d3a67040e4e161d8509 (patch) | |
tree | 685441df3bdbf979dc8124b4c33d4c430f5fff81 /activesupport | |
parent | d9d8fca780d7f9cb1c8d11eeb2d66635d349fbcb (diff) | |
download | rails-ff8510173017291e754e4d3a67040e4e161d8509.tar.gz rails-ff8510173017291e754e4d3a67040e4e161d8509.tar.bz2 rails-ff8510173017291e754e4d3a67040e4e161d8509.zip |
Copy-edit the Per Thread attribute accessor documentation
[ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb index eb65a60112..6f9cdf772d 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb @@ -15,7 +15,7 @@ class Module # end # # Current.user # => nil - # Thread.current[:attr_Current_user] = "DHH" + # Thread.thread_variable_set("attr_Current_user", "DHH") # Current.user # => "DHH" # # The attribute name must be a valid method name in Ruby. @@ -63,7 +63,7 @@ class Module # end # # Current.user = "DHH" - # Thread.current[:attr_Current_user] # => "DHH" + # Thread.thread_variable_get("attr_Current_user") # => "DHH" # # If you want to opt out the instance writer method, pass # <tt>instance_writer: false</tt> or <tt>instance_accessor: false</tt>. @@ -111,7 +111,7 @@ class Module # class Customer < Account # end # - # Customer.user = "DHH" + # Customer.user = "Rafael" # Account.user # => "DHH" # # To opt out of the instance writer method, pass <tt>instance_writer: false</tt>. |