- 18 10月, 2014 1 次提交
-
-
由 claudiob 提交于
Performance optimization: `yield` with an implicit `block` is faster than `block.call`. See http://youtu.be/fGFM_UrSp70?t=10m35s and the following benchmark: ```ruby require 'benchmark/ips' def fast yield end def slow(&block) block.call end Benchmark.ips do |x| x.report('fast') { fast{} } x.report('slow') { slow{} } end # => fast 154095 i/100ms # => slow 71454 i/100ms # => # => fast 7511067.8 (±5.0%) i/s - 37445085 in 4.999660s # => slow 1227576.9 (±6.8%) i/s - 6145044 in 5.028356s ```
-
- 17 10月, 2014 9 次提交
-
-
由 Rafael Mendonça França 提交于
Add a deprecation warning for abiguous boolean values
-
由 Sean Griffin 提交于
In Rails 5.0, we'd like to change the behavior of boolean columns in Rails to be closer to Ruby's semantics. Currently we have a small set of values which are "truthy", and all others are "falsy". In Rails 5.0, we will reverse this to have a small number of values which are "falsy", and all others will become "truthy". In the interim, all values which are ambiguous must emit a deprecation warning.
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
A warning line should look like a warning section in Guides
-
由 Rafael Mendonça França 提交于
Clarify wording in Rails HTML Sanitizer section [ci skip]
-
由 Dave Powers 提交于
[ci skip]
-
由 Rafael Mendonça França 提交于
Fix example code for `Rails::Generators::Testing::Behaviour` [ci skip]
-
由 Ryunosuke SATO 提交于
`cleanup_destination_root` method is not found anywhere. Instead, `prepare_destination` clean up distination root on setup.
-
由 Rafael Mendonça França 提交于
-
- 16 10月, 2014 29 次提交
-
-
由 Yves Senn 提交于
Closes #17197. Closes #17207. `{required}` is a type modifier so it should be: user:references{required}:index and not: user:references:index{required}
-
由 Yves Senn 提交于
mention the :without option [ci skip]
-
由 Rob 提交于
As pointed out in the ActiveModel::Validations::HelperMethods #validates_format_of documentation.
-
由 Yves Senn 提交于
clarify debugger platform invocation
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
The behavior has changed since 4.1 and non-array values are no longer type casted to a blank array. This way the user can define custom validations on that property.
-
由 Zachary Scott 提交于
[ci skip] add AC::InvalidCrossOriginRequest to list of rescue_responses default
-
由 Yves Senn 提交于
/cc @sgrif
-
由 yuuji.yaginuma 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
remove unneeded file from Railties.
-
由 Yves Senn 提交于
use require_command! instead of calling its definition
-
由 Aditya Kapoor 提交于
-
由 Aditya Kapoor 提交于
-
由 Raman Sinha 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
In the DSL you can now do: create_table(:foos) do |t| t.bigint :hi end
-
由 Guillermo Iguaran 提交于
Fix typo in actionpack/lib/action_dispatch/routing/mapper.rb [ci-skip]
-
由 Yuutetu 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Raise an error for has_one associations which try to go :through a polymorphic association
-
由 Rafael Mendonça França 提交于
ActionController::InvalidCrossOriginRequest fails with 422 instead of 500
-
由 Rafael Mendonça França 提交于
Fix how file_ and password_field_tag edit options
-
由 claudiob 提交于
This commit fixes the behavior of `file_field_tag` and `password_field_tag` when invoked with a hash of options. These two helpers are different from all the other ones in that they modify the options hash passed as a parameter, whereas all the other helpers duplicate it before updating it. The result is that *bad things* can happen if the user re-uses the same hash. For instance, users who write the following code to display a file field followed by a text field (both with the same class): ```rhtml <% options = {class: 'important'} %> <%= file_field_tag 'Upload', options %> <%= text_field_tag 'Name', options %> ``` would instead see **two file fields!** ```html <input class="important" id="Upload" name="Upload" type="file"> <input class="important" id="Name" name="Name" type="file" value="value"> ``` This PR replaces `update` with `merge` in the code of the two helpers, fixing the issue above. The included test verifies the change, since it passes after this PR, but fails before with the following error: ``` Expected: <input type="text" name="title" id="title" value="Hello!" class="important" /> Actual: <input type="password" name="title" id="title" value="Hello!" class="important" /> ```
-
由 Rafael Mendonça França 提交于
delete leftover JoinOperation struct
-
由 Rafael Mendonça França 提交于
Remove duplicate stringify_keys in text_field_tag and number_field_tag
-
由 claudiob 提交于
All the methods that invoke `text_field_tag` (such as `hidden_field_tag`) and all the methods that invoke `number_field_tag` (that is `range_field_tag`) do not need to call `stringify_keys` on their `options` parameter since the `text_field_tag` method [is already doing it internally](https://github.com/claudiob/rails/blob/4159134524f4c78d008eef9d9a17f73a3172dcc8/actionview/lib/action_view/helpers/form_tag_helper.rb#L182): ```ruby def text_field_tag(name, value = nil, options = {}) tag :input, { "type" => "text", "name" => name, "id" => sanitize_to_id(name), "value" => value }.update(options.stringify_keys) end ``` and `number_field_tag` is [already doing it internally](https://github.com/claudiob/rails/blob/e3207bdbba55f3806441f22b175557579bc0b051/actionview/lib/action_view/helpers/form_tag_helper.rb#L780) as well: ```ruby def number_field_tag(name, value = nil, options = {}) options = options.stringify_keys ... end [Note #1: My code uses `merge` to respect the existing behavior of duplicating the `options` hash before updating its keys, see https://github.com/rails/rails/pull/17096#issuecomment-57223827] [Note #2: My code uses symbols instead of strings (e.g.: `:hidden`) to look forward to future version of Ruby/Raiks (GC symbols); the result of the method, however, is the same, because the symbols are stringified inside `text_field_tag`] [Note #3: I had previously created a similar PR #17096 but decided to split it into multiple PRs given the feedback received in the comments]
-
由 Santiago Pastorino 提交于
Use `#tr` instead of `#gsub` in Journey scanner
-
- 15 10月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
Add ActiveJob to "Welcome to Rails" section
-