Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
46afe7cf
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,发现更多精彩内容 >>
提交
46afe7cf
编写于
11月 15, 2008
作者:
M
Mike Gunderloy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix markup for cattr_accessors in ActiveRecord to work with RDoc 2+.
上级
7701b061
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
7 deletion
+34
-7
activerecord/lib/active_record/base.rb
activerecord/lib/active_record/base.rb
+21
-1
activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
.../connection_adapters/abstract/connection_specification.rb
+2
-0
activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
...rd/lib/active_record/connection_adapters/mysql_adapter.rb
+9
-6
activerecord/lib/active_record/schema_dumper.rb
activerecord/lib/active_record/schema_dumper.rb
+2
-0
未找到文件。
activerecord/lib/active_record/base.rb
浏览文件 @
46afe7cf
...
...
@@ -389,6 +389,8 @@ def initialize(errors)
# So it's possible to assign a logger to the class through <tt>Base.logger=</tt> which will then be used by all
# instances in the current object space.
class
Base
##
# :singleton-method:
# Accepts a logger conforming to the interface of Log4r or the default Ruby 1.8+ Logger class, which is then passed
# on to any new database connections made and which can be retrieved on both a class and instance level by calling +logger+.
cattr_accessor
:logger
,
:instance_writer
=>
false
...
...
@@ -414,7 +416,9 @@ def self.reset_subclasses #:nodoc:
end
@@subclasses
=
{}
##
# :singleton-method:
# Contains the database configuration - as is typically stored in config/database.yml -
# as a Hash.
#
...
...
@@ -443,6 +447,8 @@ def self.reset_subclasses #:nodoc:
cattr_accessor
:configurations
,
:instance_writer
=>
false
@@configurations
=
{}
##
# :singleton-method:
# Accessor for the prefix type that will be prepended to every primary key column name. The options are :table_name and
# :table_name_with_underscore. If the first is specified, the Product class will look for "productid" instead of "id" as
# the primary column. If the latter is specified, the Product class will look for "product_id" instead of "id". Remember
...
...
@@ -450,34 +456,46 @@ def self.reset_subclasses #:nodoc:
cattr_accessor
:primary_key_prefix_type
,
:instance_writer
=>
false
@@primary_key_prefix_type
=
nil
##
# :singleton-method:
# Accessor for the name of the prefix string to prepend to every table name. So if set to "basecamp_", all
# table names will be named like "basecamp_projects", "basecamp_people", etc. This is a convenient way of creating a namespace
# for tables in a shared database. By default, the prefix is the empty string.
cattr_accessor
:table_name_prefix
,
:instance_writer
=>
false
@@table_name_prefix
=
""
##
# :singleton-method:
# Works like +table_name_prefix+, but appends instead of prepends (set to "_basecamp" gives "projects_basecamp",
# "people_basecamp"). By default, the suffix is the empty string.
cattr_accessor
:table_name_suffix
,
:instance_writer
=>
false
@@table_name_suffix
=
""
##
# :singleton-method:
# Indicates whether table names should be the pluralized versions of the corresponding class names.
# If true, the default table name for a Product class will be +products+. If false, it would just be +product+.
# See table_name for the full rules on table/class naming. This is true, by default.
cattr_accessor
:pluralize_table_names
,
:instance_writer
=>
false
@@pluralize_table_names
=
true
##
# :singleton-method:
# Determines whether to use ANSI codes to colorize the logging statements committed by the connection adapter. These colors
# make it much easier to overview things during debugging (when used through a reader like +tail+ and on a black background), but
# may complicate matters if you use software like syslog. This is true, by default.
cattr_accessor
:colorize_logging
,
:instance_writer
=>
false
@@colorize_logging
=
true
##
# :singleton-method:
# Determines whether to use Time.local (using :local) or Time.utc (using :utc) when pulling dates and times from the database.
# This is set to :local by default.
cattr_accessor
:default_timezone
,
:instance_writer
=>
false
@@default_timezone
=
:local
##
# :singleton-method:
# Specifies the format to use when dumping the database schema with Rails'
# Rakefile. If :sql, the schema is dumped as (potentially database-
# specific) SQL statements. If :ruby, the schema is dumped as an
...
...
@@ -487,6 +505,8 @@ def self.reset_subclasses #:nodoc:
cattr_accessor
:schema_format
,
:instance_writer
=>
false
@@schema_format
=
:ruby
##
# :singleton-method:
# Specify whether or not to use timestamps for migration numbers
cattr_accessor
:timestamped_migrations
,
:instance_writer
=>
false
@@timestamped_migrations
=
true
...
...
activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
浏览文件 @
46afe7cf
...
...
@@ -7,6 +7,8 @@ def initialize (config, adapter_method)
end
end
##
# :singleton-method:
# The connection handler
cattr_accessor
:connection_handler
,
:instance_writer
=>
false
@@connection_handler
=
ConnectionAdapters
::
ConnectionHandler
.
new
...
...
activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
浏览文件 @
46afe7cf
...
...
@@ -156,13 +156,16 @@ def missing_default_forged_as_empty_string?(default)
# * <tt>:sslcapath</tt> - Necessary to use MySQL with an SSL connection.
# * <tt>:sslcipher</tt> - Necessary to use MySQL with an SSL connection.
#
# By default, the MysqlAdapter will consider all columns of type <tt>tinyint(1)</tt>
# as boolean. If you wish to disable this emulation (which was the default
# behavior in versions 0.13.1 and earlier) you can add the following line
# to your environment.rb file:
#
# ActiveRecord::ConnectionAdapters::MysqlAdapter.emulate_booleans = false
class
MysqlAdapter
<
AbstractAdapter
##
# :singleton-method:
# By default, the MysqlAdapter will consider all columns of type <tt>tinyint(1)</tt>
# as boolean. If you wish to disable this emulation (which was the default
# behavior in versions 0.13.1 and earlier) you can add the following line
# to your environment.rb file:
#
# ActiveRecord::ConnectionAdapters::MysqlAdapter.emulate_booleans = false
cattr_accessor
:emulate_booleans
self
.
emulate_booleans
=
true
...
...
activerecord/lib/active_record/schema_dumper.rb
浏览文件 @
46afe7cf
...
...
@@ -7,6 +7,8 @@ module ActiveRecord
class
SchemaDumper
#:nodoc:
private_class_method
:new
##
# :singleton-method:
# A list of tables which should not be dumped to the schema.
# Acceptable values are strings as well as regexp.
# This setting is only used if ActiveRecord::Base.schema_format == :ruby
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录