Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
2fa03e62
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
2fa03e62
编写于
3月 12, 2019
作者:
V
Vipul A M
提交者:
GitHub
3月 12, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #35577 from sharang-d/typo-opt-out
Change wording of some instances of 'opt out' [ci skip]
上级
580dddc3
dcccc389
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
13 deletion
+13
-13
activesupport/lib/active_support/configurable.rb
activesupport/lib/active_support/configurable.rb
+3
-3
activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
...lib/active_support/core_ext/module/attribute_accessors.rb
+5
-5
activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb
...support/core_ext/module/attribute_accessors_per_thread.rb
+5
-5
未找到文件。
activesupport/lib/active_support/configurable.rb
浏览文件 @
2fa03e62
...
...
@@ -67,8 +67,8 @@ def configure
# end
# # => NameError: invalid config attribute name
#
# To o
pt out of
the instance writer method, pass <tt>instance_writer: false</tt>.
# To o
pt out of
the instance reader method, pass <tt>instance_reader: false</tt>.
# To o
mit
the instance writer method, pass <tt>instance_writer: false</tt>.
# To o
mit
the instance reader method, pass <tt>instance_reader: false</tt>.
#
# class User
# include ActiveSupport::Configurable
...
...
@@ -81,7 +81,7 @@ def configure
# User.new.allowed_access = true # => NoMethodError
# User.new.allowed_access # => NoMethodError
#
# Or pass <tt>instance_accessor: false</tt>, to o
pt ou
t both instance methods.
# Or pass <tt>instance_accessor: false</tt>, to o
mi
t both instance methods.
#
# class User
# include ActiveSupport::Configurable
...
...
activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
浏览文件 @
2fa03e62
...
...
@@ -24,7 +24,7 @@ class Module
# end
# # => NameError: invalid attribute name: 1_Badname
#
#
If you want to opt out the creation on
the instance reader method, pass
#
To omit
the instance reader method, pass
# <tt>instance_reader: false</tt> or <tt>instance_accessor: false</tt>.
#
# module HairColors
...
...
@@ -91,7 +91,7 @@ def #{sym}
# Person.new.hair_colors = [:blonde, :red]
# HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red]
#
#
If you want to opt ou
t the instance writer method, pass
#
To omi
t the instance writer method, pass
# <tt>instance_writer: false</tt> or <tt>instance_accessor: false</tt>.
#
# module HairColors
...
...
@@ -166,8 +166,8 @@ def #{sym}=(obj)
# Citizen.new.hair_colors << :blue
# Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue]
#
# To o
pt out of
the instance writer method, pass <tt>instance_writer: false</tt>.
# To o
pt out of
the instance reader method, pass <tt>instance_reader: false</tt>.
# To o
mit
the instance writer method, pass <tt>instance_writer: false</tt>.
# To o
mit
the instance reader method, pass <tt>instance_reader: false</tt>.
#
# module HairColors
# mattr_accessor :hair_colors, instance_writer: false, instance_reader: false
...
...
@@ -180,7 +180,7 @@ def #{sym}=(obj)
# Person.new.hair_colors = [:brown] # => NoMethodError
# Person.new.hair_colors # => NoMethodError
#
# Or pass <tt>instance_accessor: false</tt>, to o
pt ou
t both instance methods.
# Or pass <tt>instance_accessor: false</tt>, to o
mi
t both instance methods.
#
# module HairColors
# mattr_accessor :hair_colors, instance_accessor: false
...
...
activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb
浏览文件 @
2fa03e62
...
...
@@ -25,7 +25,7 @@ class Module
# end
# # => NameError: invalid attribute name: 1_Badname
#
#
If you want to opt out of the creation of
the instance reader method, pass
#
To omit
the instance reader method, pass
# <tt>instance_reader: false</tt> or <tt>instance_accessor: false</tt>.
#
# class Current
...
...
@@ -66,7 +66,7 @@ def #{sym}
# Current.user = "DHH"
# Thread.current[:attr_Current_user] # => "DHH"
#
#
If you want to opt out of the creation of
the instance writer method, pass
#
To omit
the instance writer method, pass
# <tt>instance_writer: false</tt> or <tt>instance_accessor: false</tt>.
#
# class Current
...
...
@@ -118,8 +118,8 @@ def #{sym}=(obj)
# Customer.user # => "Rafael"
# Account.user # => "DHH"
#
# To o
pt out of
the instance writer method, pass <tt>instance_writer: false</tt>.
# To o
pt out of
the instance reader method, pass <tt>instance_reader: false</tt>.
# To o
mit
the instance writer method, pass <tt>instance_writer: false</tt>.
# To o
mit
the instance reader method, pass <tt>instance_reader: false</tt>.
#
# class Current
# thread_mattr_accessor :user, instance_writer: false, instance_reader: false
...
...
@@ -128,7 +128,7 @@ def #{sym}=(obj)
# Current.new.user = "DHH" # => NoMethodError
# Current.new.user # => NoMethodError
#
# Or pass <tt>instance_accessor: false</tt>, to o
pt ou
t both instance methods.
# Or pass <tt>instance_accessor: false</tt>, to o
mi
t both instance methods.
#
# class Current
# thread_mattr_accessor :user, instance_accessor: false
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录