- 05 4月, 2015 1 次提交
-
-
由 Mehmet Emin İNAÇ 提交于
request.env['REQUEST_URI'] returns full URI of the resource request.env['PATH_INFO'] returns only path of the resource
-
- 02 4月, 2015 4 次提交
-
-
由 Jeremy Kemper 提交于
Prefer string patterns for gsub
-
由 brainopia 提交于
-
由 brainopia 提交于
https://github.com/ruby/ruby/pull/579 - there is a new optimization since ruby 2.2 Previously regexp patterns were faster (since a string was converted to regexp underneath anyway). But now string patterns are faster and better reflect the purpose. Benchmark.ips do |bm| bm.report('regexp') { 'this is ::a random string'.gsub(/::/, '/') } bm.report('string') { 'this is ::a random string'.gsub('::', '/') } bm.compare! end # string: 753724.4 i/s # regexp: 501443.1 i/s - 1.50x slower
-
由 Carlos Antonio da Silva 提交于
Since we now only support Ruby 2.2+, we can safely remove the old mri entries from the Gemfile. This also allows us not to lock to a specific bundler version, since :mri_22 was defined only on 1.7.11. Closes #19611.
-
- 01 4月, 2015 17 次提交
-
-
由 Abdelkader Boudih 提交于
[ci skip] Replace `reraised` with `not captured`
-
由 Abdelkader Boudih 提交于
[skip ci] Add information about #link_to target option
-
由 Anton Davydov 提交于
-
由 yui-knk 提交于
-
由 Rafael Mendonça França 提交于
[ci skip] fix guides example on arbitrary SQL execution
-
由 Konstantinos Rousis 提交于
-
由 Rafael Mendonça França 提交于
[ci skip] Fix `:having` option with `having` method
-
由 yui-knk 提交于
-
由 Rafael Mendonça França 提交于
Update routing.md
-
由 Jonan Scheffler 提交于
This adds instructions for routing to rack applications with mount instead of match. I just spent an unreasonable amount of time staring at this, hopefully the next person will save some time. It's possible that the docs should simply advise people to use mount and leave out the match method but I don't know enough about the differences in the two approaches to assert that definitively.
-
由 Rafael Mendonça França 提交于
Only coerce time when comparing if necessary
-
由 Aaron Jensen 提交于
In dev, ActiveSupport::FileUpdateChecker#max_mtime triggers many time comparisons. Time#to_time is quite a bit slower than not doing it, so we should avoid it if possible.
-
由 Rafael Mendonça França 提交于
Fix eager loading association using default_scope for finder methods.
-
由 Rafael Mendonça França 提交于
Remove unused subdir deployment considerations section [ci skip]
-
由 Eliot Sykes 提交于
-
由 Santosh Wadghule 提交于
- Eager loading was not working for the default_scope (class method) for 'find' & 'find_by' methods. - Fixed these by adding a new check 'respond_to?(:default_scope)'.
-
由 Rafael Mendonça França 提交于
-
- 31 3月, 2015 15 次提交
-
-
由 Carlos Antonio da Silva 提交于
remove extra newline from ApplicationJob template
-
由 yuuji.yaginuma 提交于
-
由 Arthur Nogueira Neves 提交于
[ci skip] Replace `query methods` with `a predicate`
-
由 yui-knk 提交于
-
由 Yves Senn 提交于
Fix doc: set_callback also accepts an array of if:
-
由 claudiob 提交于
When Active Record calls `set_callback` inside `after_commit`, [these lines of code](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/transactions.rb#L276) pass an **array** of methods as the `:if` condition: ```ruby options[:if] = Array(options[:if]) options[:if] << "transaction_include_any_action?(#{fire_on})" ``` That made me realize that anyone could pass an **array** of `:if` and `:unless` conditions to `set_callback`, since Active Support transforms these conditions into an array anyways in [these lines of code](https://github.com/rails/rails/blob/master/activesupport/lib/active_support/callbacks.rb#L365): ```ruby @if = Array(options[:if]) @unless = Array(options[:unless]) ``` Long story short, this commit updates the documentation of the `set_callback` method to explain that arrays are also accepted. It also replaces +false+ and +true+ with false and true, since any _falsey_ or _truthy_ value will work. [ci skip]
-
由 Yves Senn 提交于
rename `widgets` table to `new_widgets`
-
由 Kuldeep Aggarwal 提交于
`widgets` table is being created in `primary_keys_test.rb` for PostgreSQLAdapter, MysqlAdapter, Mysql2Adapter and it makes test to fail earlier. Before: `bundle exec rake mysql2:test` ``` Finished in 127.287669s, 35.5258 runs/s, 97.8885 assertions/s. 1) Error: PersistenceTest::SaveTest#test_save_touch_false: ActiveModel::UnknownAttributeError: unknown attribute 'name' for #<Class:0x0000000a7d6ef0>. /home/kd/projects/kd-rails/activerecord/lib/active_record/attribute_assignment.rb:36:in `rescue in _assign_attribute' /home/kd/projects/kd-rails/activerecord/lib/active_record/attribute_assignment.rb:34:in `_assign_attribute' /home/kd/projects/kd-rails/activemodel/lib/active_model/attribute_assignment.rb:40:in `block in _assign_attributes' /home/kd/projects/kd-rails/activemodel/lib/active_model/attribute_assignment.rb:39:in `each' /home/kd/projects/kd-rails/activemodel/lib/active_model/attribute_assignment.rb:39:in `_assign_attributes' /home/kd/projects/kd-rails/activerecord/lib/active_record/attribute_assignment.rb:26:in `_assign_attributes' /home/kd/projects/kd-rails/activemodel/lib/active_model/attribute_assignment.rb:33:in `assign_attributes' /home/kd/projects/kd-rails/activerecord/lib/active_record/core.rb:293:in `initialize' /home/kd/projects/kd-rails/activerecord/lib/active_record/inheritance.rb:61:in `new' /home/kd/projects/kd-rails/activerecord/lib/active_record/inheritance.rb:61:in `new' /home/kd/projects/kd-rails/activerecord/lib/active_record/persistence.rb:50:in `create!' /home/kd/projects/kd-rails/activerecord/test/cases/persistence_test.rb:913:in `test_save_touch_false' 4522 runs, 12460 assertions, 0 failures, 1 errors, 4 skips ``` After: `bundle exec rake mysql2:test` ``` Finished in 135.785086s, 33.3026 runs/s, 91.7774 assertions/s. 4522 runs, 12462 assertions, 0 failures, 0 errors, 4 skips ```
-
由 Guillermo Iguaran 提交于
Require Module#delegate core ext in ActiveModel::Naming
-
由 Ryan Bigg 提交于
-
由 Rafael Mendonça França 提交于
Combine complementary AR #find doc lines
-
由 Alexander Dimitriyadi 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Simplify and alias ActiveModel::Errors methods where possible
-
由 Rafael Mendonça França 提交于
This reverts commit 9420de59. Reason: Turns out we want to keep this method.
-
- 30 3月, 2015 3 次提交
-
-
由 Matthew Draper 提交于
Add explicit base class for ActiveJob jobs
-
由 Rafael Mendonça França 提交于
Test using sprockets 3
-
由 Rafael Mendonça França 提交于
-