- 11 2月, 2016 4 次提交
-
-
由 Kasper Timm Hansen 提交于
When testing: ```ruby post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json ``` It's common to want to make assertions on the response body. Perhaps the server responded with JSON, so you write `JSON.parse(response.body)`. But that gets tedious real quick. Instead add `parsed_body` which will automatically parse the reponse body as what the last request was encoded `as`.
-
由 David Heinemeier Hansson 提交于
Add `as` to encode a request as a specific mime type.
-
由 David Heinemeier Hansson 提交于
Fix edge case with ActionView::Template::Error reraise
-
由 David Heinemeier Hansson 提交于
set association name to generated fixtures if attribute is reference
-
- 10 2月, 2016 14 次提交
-
-
由 Vipul A M 提交于
Fix tiny grammar.
-
由 Mawueli Kofi Adzoe 提交于
-
由 प्रथमेश Sonpatki 提交于
Fix typo
-
由 John Cole 提交于
-
由 Jon Moss 提交于
Fix grammar errors in security and migrations docs master [ci skip]
-
由 Matt Michnal 提交于
Fixed errors in rails migrations docs [ci skip] Fixed errors in rails security docs [ci skip]
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Aaron Patterson 提交于
We don't need to use active support in this case because we know the type that will be returned.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Rafael França 提交于
Update documentation regarding initializers
-
- 09 2月, 2016 12 次提交
-
-
由 Vipul A M 提交于
remove description of `render :nothing` from guide [ci skip]
-
由 yuuji.yaginuma 提交于
`:nothing` option was deprecated in 44781b6e
-
由 Jon Moss 提交于
Fix typo [ci skip]
-
由 Ryuta Kamizono 提交于
-
由 Aaron Patterson 提交于
For better or worse, anonymous `*` args will allocate arrays. Ideally, the interpreter would optimize away this allocation. However, given the number of times we call `html_safe` it seems worth the shedding idealism and going for performance. This line was the top allocation spot for a scaffold (and presumably worse on real applications).
-
由 Aaron Patterson 提交于
``` [aaron@TC rails (master)]$ cat xor.rb a = "\x14b\"\xB4P8\x05\x8D\xC74\xC3\xEC}\xFDf\x8E!h\xCF^\xBF\xA5%\xC6\xF0\xA9\xF9x\x04\xFA\xF1\x82" b = "O.\xF7\x01\xA9D\xA3\xE1D\x7FU\x85\xFC\x8Ak\e\x04\x8A\x97\x91\xD01\x02\xA4G\x1EIf:Y\x0F@" def xor_byte_strings(s1, s2) s1.bytes.zip(s2.bytes).map { |(c1,c2)| c1 ^ c2 }.pack('c*') end def xor_byte_strings2(s1, s2) s2_bytes = s2.bytes s1.bytes.map.with_index { |c1, i| c1 ^ s2_bytes[i] }.pack('c*') end require 'benchmark/ips' require 'allocation_tracer' Benchmark.ips do |x| x.report 'xor_byte_strings' do xor_byte_strings a, b end x.report 'xor_byte_strings2' do xor_byte_strings2 a, b end end ObjectSpace::AllocationTracer.setup(%i{type}) result = ObjectSpace::AllocationTracer.trace do xor_byte_strings a, b end p :xor_byte_strings => result ObjectSpace::AllocationTracer.clear result = ObjectSpace::AllocationTracer.trace do xor_byte_strings2 a, b end p :xor_byte_strings2 => result [aaron@TC rails (master)]$ ruby -I~/git/allocation_tracer/lib xor.rb Calculating ------------------------------------- xor_byte_strings 10.087k i/100ms xor_byte_strings2 11.339k i/100ms ------------------------------------------------- xor_byte_strings 108.386k (± 5.8%) i/s - 544.698k xor_byte_strings2 122.239k (± 3.0%) i/s - 612.306k {:xor_byte_strings=>{[:T_ARRAY]=>[38, 0, 0, 0, 0, 0], [:T_STRING]=>[2, 0, 0, 0, 0, 0]}} {:xor_byte_strings2=>{[:T_ARRAY]=>[3, 0, 0, 0, 0, 0], [:T_DATA]=>[1, 0, 0, 0, 0, 0], [:T_IMEMO]=>[2, 0, 0, 0, 0, 0], [:T_STRING]=>[2, 0, 0, 0, 0, 0]}} ```
-
由 Jon Moss 提交于
[ci skip] Fix grammar
-
由 Abhishek Jain 提交于
-
由 Arthur Nogueira Neves 提交于
fix 'method redefined' warnings
-
由 Jon Moss 提交于
Fix a typo
-
由 Prayag Verma 提交于
Replace `a` with `an`
-
由 Rafael Mendonça França 提交于
This reverts commit 8c3cca5e, reversing changes made to 9dcf67c4. Reason: https://github.com/rails/rails/pull/23562#issuecomment-181442569
-
- 08 2月, 2016 10 次提交
-
-
由 Kasper Timm Hansen 提交于
Update rails-html-sanitizer version to v1.0.3
-
由 Karim El-Husseiny 提交于
rails-html-sanitizer 1.0.2 is vulnerable: https://groups.google.com/d/msg/rubyonrails-security/uh--W4TDwmI/m_CVZtdbFQAJ
-
由 प्रथमेश Sonpatki 提交于
Remove references to Rails 4 from assets guide [ci skip]
-
由 Kasper Timm Hansen 提交于
revert dev:cache to rake task, fixes #23410
-
由 Vipul A M 提交于
Add numeric type in the doc [ci skip]
-
由 Ryuta Kamizono 提交于
Follow up to #23508.
-
由 Prathamesh Sonpatki 提交于
-
由 प्रथमेश Sonpatki 提交于
remove `faye-websocket` dependency from README [ci skip]
-
由 yuuji.yaginuma 提交于
`faye-websocket` gem is no longer used from 322dca29.
-
由 Jon Moss 提交于
config examples for ActionCable now use Rails.application.config.action_cable
-