- 21 10月, 2015 5 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Reorder application of has_many association constraints.
-
由 kal 提交于
-
由 Rafael Mendonça França 提交于
nodoc for active support protected method [CI skip]
-
- 20 10月, 2015 9 次提交
-
-
由 Yves Senn 提交于
Delete needless `require 'active_support/deprecation'`
-
由 Yves Senn 提交于
[ci skip] Replace "destroy` method" with `destroy` action`
-
由 yui-knk 提交于
Sure this is `destroy` method of PhotosController, but in this chapter these methods which mapped by the router are called "action". For example: ```ruby get '/patients/:id', to: 'patients#show' ``` is described to dispatch "controller's `show` action".
-
由 yui-knk 提交于
When `require 'active_support/rails'`, 'active_support/deprecation' is automatically loaded.
-
由 Sean Griffin 提交于
Fix #21977: Removes memoization of helpers in Rails console
-
由 Sean Griffin 提交于
Green version of moving the handling of supported arguments to `where`
-
由 Sean Griffin 提交于
Added context for running engine:migrations:install task. [ci skip]
-
由 Simon H 提交于
-
由 Claudio B. 提交于
Remove outdated documentation regarding a bundled version of TZInfo
-
- 19 10月, 2015 4 次提交
-
-
由 Santiago Pastorino 提交于
Show helpful messages on invalid param. encodings
-
由 Agis Anastasopoulos 提交于
Prior to this change, given a route: # config/routes.rb get ':a' => "foo#bar" If one pointed to http://example.com/%BE (param `a` has invalid encoding), a `BadRequest` would be raised with the following non-informative message: ActionController::BadRequest From now on the message displayed is: Invalid parameter encoding: hi => "\xBE" Fixes #21923.
-
由 jbranchaud 提交于
With `unscope!` called last, it undoes `where` constraints of the same value when the `where` is chained after the `unscope`. This is what a `rewhere` does. This is undesirable behavior. The included tests demonstrate both the `unscope(...).where(...)` behavior as well as the direct use of `rewhere(...)`. This is in reference to #21955.
-
由 Phil Ross 提交于
The bundled version of TZInfo referred to was removed from Active Support in version 3.0.
-
- 18 10月, 2015 6 次提交
-
-
由 Arthur Nogueira Neves 提交于
remove useless method
-
由 Eileen M. Uchitelle 提交于
[ci skip] Improve readability in active model basics guide
-
由 Tim Wade 提交于
* adds/removes a few words * removes an unnecessary comma
-
由 yuuji.yaginuma 提交于
`images` method has been deleted in 2bc48561, `create_images_directory` does nothing.
-
由 Rafael Mendonça França 提交于
This reverts commit 4d8f62dc. Reason: This broke the build. Please recommit again when it is green.
-
- 17 10月, 2015 9 次提交
-
-
由 Yves Senn 提交于
Suppress warnings of `assigned but unused variable`
-
由 Richard Schneeman 提交于
Use "rake time:zones:all" instead of "rake -D time" [ci skip]
-
由 yui-knk 提交于
-
由 Marat Galiev 提交于
-
由 Charles Treatman 提交于
In the Rails console, the `helper` function provides a shorthand for working with application helpers. However, `helper` memoizes the value of `ApplicationController#helpers`. This means that if a user subsequently changes helper code and calls `reload!` in the console, their code changes will not be reflected by the `helper` function, even though the helper was, in fact, reloaded.
-
由 schneems 提交于
If you can't start your queue, you won't process much. This change adds external links to the Queue backends that have Active Job specific docs.
-
由 Sean Griffin 提交于
`WhereClauseFactory` handles all other branches based on argument types, so the code fits more naturally here, and it's just where the responsibility belongs.
-
由 Matthew Draper 提交于
Fix deprecation warning messages on deprecate_methods
-
由 Sean Griffin 提交于
where raises ArgumentError on unsupported argument types
-
- 16 10月, 2015 7 次提交
-
-
由 Jake Worth 提交于
[#20473]
-
由 Yves Senn 提交于
Remove mentioned of 'readonly' options in doc for HABTM [ci skip]
-
由 Ignatius Reza 提交于
-
由 Aaron Patterson 提交于
`each_with_object` allocates an array for each kv pair. Switching to the slightly more verbose but less allocatey `each_pair` eliminates array allocations. Eliminating this allocation returns AR objects to have constant array allocations regardless of the number of columns the object has. Here is test code: ```ruby require 'active_record' class Topic < ActiveRecord::Base end 20.times do |i| Process.waitpid fork { ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' ActiveRecord::Base.connection.instance_eval do create_table(:topics) do |t| t.string :title, limit: 250 t.string :author_name t.string :author_email_address t.string :parent_title t.string :type t.string :group i.times do |j| t.string :"aaa#{j}" end t.timestamps null: true end end ObjectSpace::AllocationTracer.setup(%i{type}) Topic.create title: "aaron" # heat cache result = ObjectSpace::AllocationTracer.trace do 10.times do |i| Topic.create title: "aaron #{i}" end end puts "#{Topic.columns.length},#{(result.find { |k,v| k.first == :T_ARRAY }.last.first / 10)}" } end ``` Before this commit: ``` 9,166 10,167 11,168 12,169 13,170 14,171 15,172 16,173 17,174 18,175 19,176 20,177 21,178 22,179 23,180 24,181 25,182 26,183 27,184 28,185 ``` After: ``` 9,157 10,157 11,157 12,157 13,157 14,157 15,157 16,157 17,157 18,157 19,157 20,157 21,157 22,157 23,157 24,157 25,157 26,157 27,157 28,157 ``` Left side is the number of columns, right is the number of allocations
-
由 Rafael Mendonça França 提交于
Clarifies db can be set up from structure.sql as well as from schema.rb
-
由 Anna Ershova 提交于
Add 'db/'; corrects structure.rb to structure.sql
-
由 Aaron Patterson 提交于
deep_dup'ing a hash will dup the keys as well as the values. Since string keys from the source hash will be frozen, and the dup'd objects are immediately dup'd and frozen on insert in to the hash, the end user will only ever see two frozen strings. Since the strings are immutable, this commit just cheats a little and reuses the immutable strings. Just to reiterate, before this commit, deep duping a hash that looks like this: `{ "foo" => "bar" }` will generate two new instances of "foo". One is created when `deep_dup` is called on "foo", and the other is created when the newly allocated "foo" string is inserted in to the hash. The user never sees the intermediate "foo", and both copies of "foo" that the user *can* access will be frozen, so in this case we just reuse the existing frozen key. The upshot is that after this change, string allocations on AR allocations become constant regardless of the number of columns the model has. ```ruby require 'active_record' class Topic < ActiveRecord::Base end 20.times do |i| Process.waitpid fork { ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' ActiveRecord::Base.connection.instance_eval do create_table(:topics) do |t| t.string :title, limit: 250 t.string :author_name t.string :author_email_address t.string :parent_title t.string :type t.string :group i.times do |j| t.integer :"aaa#{j}" end t.timestamps null: true end end ObjectSpace::AllocationTracer.setup(%i{type}) Topic.create title: "aaron" # heat cache result = ObjectSpace::AllocationTracer.trace do 10.times do |i| Topic.create title: "aaron #{i}" end end puts "#{Topic.columns.length},#{(result.find { |k,v| k.first == :T_STRING }.last.first / 10)}" } end ``` If you run the above script before this commit, the output looks like this: ``` [aaron@TC rails (master)]$ be ruby -rallocation_tracer test.rb 9,105 10,107 11,109 12,111 13,113 14,115 15,117 16,119 17,121 18,123 19,125 20,127 21,129 22,131 23,133 24,135 25,137 26,139 27,141 28,143 ``` The left column is the number of methods, the right column is the number of string allocations. Running against this commit, the output is: ``` [aaron@TC rails (master)]$ be ruby -rallocation_tracer test.rb 9,87 10,87 11,87 12,87 13,87 14,87 15,87 16,87 17,87 18,87 19,87 20,87 21,87 22,87 23,87 24,87 25,87 26,87 27,87 28,87 ``` As you can see, there is now only a constant number of strings allocated, regardless of the number of columns the model has.
-