Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
04d308a0
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,发现更多精彩内容 >>
提交
04d308a0
编写于
12月 29, 2011
作者:
V
Vijay Dev
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:lifo/docrails
上级
88aeeee2
1fc6036b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
22 deletion
+17
-22
actionpack/lib/action_dispatch/routing/mapper.rb
actionpack/lib/action_dispatch/routing/mapper.rb
+7
-0
actionpack/lib/action_view/helpers/form_tag_helper.rb
actionpack/lib/action_view/helpers/form_tag_helper.rb
+6
-11
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
..._record/connection_adapters/abstract/schema_statements.rb
+2
-9
activerecord/lib/active_record/counter_cache.rb
activerecord/lib/active_record/counter_cache.rb
+1
-1
activerecord/lib/active_record/relation.rb
activerecord/lib/active_record/relation.rb
+1
-1
未找到文件。
actionpack/lib/action_dispatch/routing/mapper.rb
浏览文件 @
04d308a0
...
...
@@ -1053,6 +1053,13 @@ def resource(*resources, &block)
#
# The above example will now change /posts/new to /posts/brand_new
#
# [:path]
# Allows you to change the path prefix for the resource.
#
# resources :posts, :path => 'postings'
#
# The resource and all segments will now route to /postings instead of /posts
#
# [:only]
# Only generate routes for the given actions.
#
...
...
actionpack/lib/action_view/helpers/form_tag_helper.rb
浏览文件 @
04d308a0
...
...
@@ -393,21 +393,17 @@ def radio_button_tag(name, value, checked = false, options = {})
# submit_tag "Save edits", :disabled => true
# # => <input disabled="disabled" name="commit" type="submit" value="Save edits" />
#
#
# submit_tag "Complete sale", :disable_with => "Please wait..."
# # => <input name="commit" data-disable-with="Please wait..."
# # type="submit" value="Complete sale" />
# # => <input name="commit" data-disable-with="Please wait..." type="submit" value="Complete sale" />
#
# submit_tag nil, :class => "form_submit"
# # => <input class="form_submit" name="commit" type="submit" />
#
# submit_tag "Edit", :disable_with => "Editing...", :class => "edit_button"
# # => <input class="edit_button" data-disable_with="Editing..."
# # name="commit" type="submit" value="Edit" />
# # => <input class="edit_button" data-disable_with="Editing..." name="commit" type="submit" value="Edit" />
#
# submit_tag "Save", :confirm => "Are you sure?"
# # => <input name='commit' type='submit' value='Save'
# data-confirm="Are you sure?" />
# # => <input name='commit' type='submit' value='Save' data-confirm="Are you sure?" />
#
def
submit_tag
(
value
=
"Save changes"
,
options
=
{})
options
=
options
.
stringify_keys
...
...
@@ -451,12 +447,11 @@ def submit_tag(value = "Save changes", options = {})
# content_tag(:strong, 'Ask me!')
# end
# # => <button name="button" type="button">
#
<strong>Ask me!</strong>
#
</button>
#
#
<strong>Ask me!</strong>
#
#
</button>
#
# button_tag "Checkout", :disable_with => "Please wait..."
# # => <button data-disable-with="Please wait..." name="button"
# type="submit">Checkout</button>
# # => <button data-disable-with="Please wait..." name="button" type="submit">Checkout</button>
#
def
button_tag
(
content_or_options
=
nil
,
options
=
nil
,
&
block
)
options
=
content_or_options
if
block_given?
&&
content_or_options
.
is_a?
(
Hash
)
...
...
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
浏览文件 @
04d308a0
...
...
@@ -301,15 +301,8 @@ def rename_column(table_name, column_name, new_column_name)
# Adds a new index to the table. +column_name+ can be a single Symbol, or
# an Array of Symbols.
#
# The index will be named after the table and the first column name,
# unless you pass <tt>:name</tt> as an option.
#
# When creating an index on multiple columns, the first column is used as a name
# for the index. For example, when you specify an index on two columns
# [<tt>:first</tt>, <tt>:last</tt>], the DBMS creates an index for both columns as well as an
# index for the first column <tt>:first</tt>. Using just the first name for this index
# makes sense, because you will never have to create a singular index with this
# name.
# The index will be named after the table and the column name(s), unless
# you pass <tt>:name</tt> as an option.
#
# ===== Examples
#
...
...
activerecord/lib/active_record/counter_cache.rb
浏览文件 @
04d308a0
...
...
@@ -65,7 +65,7 @@ def reset_counters(id, *counters)
# Post.update_counters [10, 15], :comment_count => 1
# # Executes the following SQL:
# # UPDATE posts
# # SET comment_count = COALESCE(comment_count, 0) + 1
,
# # SET comment_count = COALESCE(comment_count, 0) + 1
# # WHERE id IN (10, 15)
def
update_counters
(
id
,
counters
)
updates
=
counters
.
map
do
|
counter_name
,
value
|
...
...
activerecord/lib/active_record/relation.rb
浏览文件 @
04d308a0
...
...
@@ -356,7 +356,7 @@ def destroy_all(conditions = nil)
end
end
# Destroy an object (or multiple objects) that has the given id
, t
he object is instantiated first,
# Destroy an object (or multiple objects) that has the given id
. T
he object is instantiated first,
# therefore all callbacks and filters are fired off before the object is deleted. This method is
# less efficient than ActiveRecord#delete but allows cleanup methods and other actions to be run.
#
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录