| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix typo
|
|/ |
|
|\
| |
| |
| |
| | |
mgm702/fix_grammar_errors_in_security_and_migrations_docs_master
Fix grammar errors in security and migrations docs master [ci skip]
|
|/
|
|
|
|
| |
Fixed errors in rails migrations docs [ci skip]
Fixed errors in rails security docs [ci skip]
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We don't need to use active support in this case because we know the
type that will be returned.
|
| |
|
| |
|
|\
| |
| | |
Update documentation regarding initializers
|
|/
|
|
|
|
|
| |
- Remove ActionController `logger` and `initialize_framework_caches`
which were merged into `set_configs` in fbc9d0f4
- Rename ActiveRecord `set_reloader_hooks` changed in 283a0876
- Add missing initializers for ActionController and ActiveRecord
|
|\
| |
| |
| |
| | |
y-yagi/remove_deprecated_render_nothing_from_guide
remove description of `render :nothing` from guide [ci skip]
|
|/
|
|
| |
`:nothing` option was deprecated in 44781b6e9790d90b4f8b9a41d2b2c114b1a582ee
|
|\
| |
| | |
Fix typo [ci skip]
|
|/ |
|
|
|
|
|
|
|
|
| |
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@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]}}
```
|
|\
| |
| | |
[ci skip] Fix grammar
|
| | |
|
|\ \
| |/
|/| |
fix 'method redefined' warnings
|
| | |
|
|\ \
| | |
| | | |
Fix a typo
|
|/ /
| |
| | |
Replace `a` with `an`
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 8c3cca5e113213958469b1cec8aa9a664535251a, reversing
changes made to 9dcf67c4da35b165301865d9721da1d552f7e03f.
Reason: https://github.com/rails/rails/pull/23562#issuecomment-181442569
|
|\ \
| | |
| | | |
Update rails-html-sanitizer version to v1.0.3
|
|/ /
| |
| | |
rails-html-sanitizer 1.0.2 is vulnerable: https://groups.google.com/d/msg/rubyonrails-security/uh--W4TDwmI/m_CVZtdbFQAJ
|
|\ \
| | |
| | | |
Remove references to Rails 4 from assets guide [ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
revert dev:cache to rake task, fixes #23410
|
| | |/
| |/| |
|
|\ \ \
| |_|/
|/| | |
Add numeric type in the doc [ci skip]
|
| | |
| | |
| | |
| | | |
Follow up to #23508.
|
|\ \ \
| | | |
| | | | |
remove `faye-websocket` dependency from README [ci skip]
|
| | | |
| | | |
| | | |
| | | | |
`faye-websocket` gem is no longer used from 322dca293b3716ccaa09e7e82046e539b0d2ffda.
|
|\ \ \ \
| | | | |
| | | | | |
config examples for ActionCable now use Rails.application.config.action_cable
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Some existing examples used ActionCable.server.config but for
configuring allowed_request_origins that is overridden in development
mode. The correct place to set that is
Rails.application.config.action_cable which the ActionCable initializer
loads from. I thought the other two examples should be changed as well
just in case a default value that would override a configured value is
introduced for either log_tags or disable_request_forgery_protection in
the future.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
update turbolinks url [ci skip]
|
|/ / / / |
|
|\ \ \ \
| |/ / /
|/| | | |
`schema_type` returns symbol rather than string
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A return value of `schema_type` is used by:
1. primary key type: using as `symbol.inspect`
2. normal column type: using as `symbol.to_s`
It is better to return symbol.
|
|\ \ \
| | | |
| | | | |
Added numeric helper into `SchemaStatements` for MySQL and PostgreSQL
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With this addition, you can add a column into the table like:
```
create_table(:numeric_types) do |t|
t.numeric :foo, precision: 10, scale: 2, default: 2.0
end
```
The result of the migration above is same with:
```
create_table(:numeric_types) do |t|
t.decimal :foo, precision: 10, scale: 2, default: 2.0
end
```
|
|\ \ \ \
| | | | |
| | | | | |
doc changes to clarify asset pipeline
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
for rails/rails#23431
modified: guides/source/asset_pipeline.md
* description of asset combination from apps and gems, e.g. jquery-rails
* after @vipulnsward's related change rails/rails#23479
correction: --skip-sprockets will prevent all of these gems, not just sass-rails and uglifier
modified: guides/source/working_with_javascript_in_rails.md
* noted that rails.js requires the asset pipeline
[ci skip]
|
|\ \ \ \
| | | | |
| | | | | |
Hand off the interlock to the new thread in AC::Live
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
A full write-preferring wait can lead to deadlock.
|