yuuji.yaginuma
2047877f4e
make work bin/test scripts with line filter
...
`Rails::LineFiltering` is not automatically loaded, need to load it explicitly.
Ref: 797f1dd, b6f935b
2016-12-17 18:08:57 +09:00
Rafael França
86ca5b2541
Merge pull request #27387 from MSP-Greg/master
...
Change ActiveModel::Type::Helpers to :nodoc: [ci skip]
2016-12-16 16:58:54 -05:00
MSP-Greg
e41c6ec888
Change ActiveModel::Type::Helpers to :nodoc: [ci skip]
2016-12-16 13:35:37 -06:00
Rafael França
e55fac51d9
Merge pull request #27386 from kevinhughes27/add-generator-command-line-arg-docs
...
Docs Command Line Arguments for Generators
2016-12-16 13:04:02 -05:00
Kevin Hughes
5578ce4036
[ci skip] add a section explaining command line arguments for generators
2016-12-16 11:16:16 -05:00
Rafael França
f98d487f1b
Merge pull request #27375 from kirs/fixture-error-message
...
Throw friendly error message when fixture is not a hash
2016-12-16 10:49:00 -05:00
eileencodes
8a37ac9264
Bump coffee-script-source to fix bug
...
Coffee script 1.12.1 was released and contained a bug where coffee
script was undefined. 1.12.1 was yanked and 1.12.2 was released. This
bumps coffee-script-source so that CI Railties tests pass.
See: https://github.com/jashkenas/coffeescript/issues/4403
2016-12-16 10:43:44 -05:00
Vijay Dev
0aae8aec3b
Merge branch 'master' of github.com:rails/docrails
2016-12-16 15:21:06 +00:00
Matthew Draper
a47efcfcae
Merge pull request #27368 from matthewd/doubled-callbacks
...
Support double-yield inside an around callback
2016-12-16 23:14:46 +10:30
Kir Shatrov
3e018eca32
Throw friendly error message when fixture is not a hash
...
Right now, when fixture is not a Hash we throw an error message
saying "fixture is not a hash". This is not very user friendly because
it's not saying which fixture is invalid.
2016-12-15 17:07:58 -05:00
Rafael França
b89f1aa760
Merge pull request #27341 from richardmonette/fix-querycache-nil-dup
...
fix QueryCache nil dup
2016-12-15 17:02:22 -05:00
Richard Monette
e220fda3e5
fix QueryCache nil dup
...
make sql statements frozen
dup if arel is not our string
expect runtime error
dont wrap runtime error in invalid
log errors will now be treated as runtime errors
update changelog
2016-12-15 16:38:35 -05:00
Kasper Timm Hansen
4b576f4821
Merge pull request #27367 from georgeclaghorn/local-form-with
...
Avoid invalid attribute on local forms generated by `form_with`
2016-12-15 20:07:12 +01:00
Andreas Maierhofer
61075cb79c
Add missing spaces to button_tag api doc [ci skip] ( #27369 )
2016-12-15 18:46:52 +05:30
Matthew Draper
833ea903a9
Support double-yield inside an around callback
...
It's questionable whether this is a good thing -- it forces any later/
inner callback to handle multiple invocations, along with the actual
wrapped action. But it worked prior to 871ca21f6a1d65c0ec78cb5a9641411e2210460b,
so we shouldn't break it unintentionally.
2016-12-15 19:23:10 +10:30
George Claghorn
5b217c3a7f
Avoid invalid attribute on local forms generated by form_with
...
Fixes that the following ERB template would result in invalid HTML
output:
<%= form_with model: Post.new, local: true do |form| %>
<% end %>
Specifically, the resulting form tag would have a spurious `remote`
attribute:
<form remote="false" ...>
2016-12-15 02:10:10 -05:00
Jon Moss
1f0fe334f5
Merge pull request #27358 from utilum/27347
...
Mention JS Runtime dependency in dev dependencies guide [ci skip].
2016-12-14 15:15:03 -05:00
Rafael França
4ae8595ca2
Merge pull request #27354 from Shopify/fix-constantize-and-prepended-modules
...
Fix constantize edge case involving prepend, autoloading and name conflicts
2016-12-14 12:31:09 -05:00
utilum
7d62e27dd5
Mention JS Runtime dependency in dev dependencies guide [ci skip].
2016-12-14 16:08:44 +01:00
Eileen M. Uchitelle
44c4b87d0d
Merge pull request #27353 from mtsmfm/remove-unused-method
...
Remove unused method `namespaced_file_path`
2016-12-14 09:38:46 -05:00
Jean Boussier
11e05defec
Fix constantize edge case involving prepend, autoloading and name conflicts
...
In the following situation:
```ruby
class Bar
end
module Baz
end
class Foo
prepend Baz
end
class Foo::Bar
end
```
Running `Inflector.constantize('Foo::Bar')` would blow up with a NameError.
What is happening is that `constatize` was written before the introduction
of prepend, and wrongly assume that `klass.ancestors.first == klass`.
So it uses `klass.ancestors.inject` without arguments, as a result
a prepended module is used in place of the actual class.
2016-12-14 14:25:43 +01:00
Fumiaki MATSUSHIMA
a0d4d78884
Remove unused method namespaced_file_path
...
```
$ git grep namespaced_file_path
railties/lib/rails/generators/named_base.rb: def namespaced_file_path
railties/lib/rails/generators/named_base.rb: @namespaced_file_path ||= namespaced_class_path.join("/")
```
2016-12-14 19:10:11 +09:00
Kasper Timm Hansen
e3e663f1dc
Merge pull request #27350 from y-yagi/use_appropriate_type_for_rc_option
...
use appropriate type for `rc` option
2016-12-14 08:42:32 +01:00
Akira Matsuda
4cc82db4ad
Missing require "active_support/testing/constant_lookup"
2016-12-14 14:20:53 +09:00
yuuji.yaginuma
92dae5dfda
use appropriate type for rc
option
...
This fixes the following warning.
```
Expected boolean default value for '--rc'; got "~/.railsrc" (string)
```
2016-12-14 11:12:13 +09:00
Rafael França
54fa0a69ec
Merge pull request #27349 from y-yagi/fix_ruby_warning_in_ruby_2_4
...
fix new warning in ruby 2.4
2016-12-13 20:34:27 -05:00
yuuji.yaginuma
2f6105e494
fix new warning in ruby 2.4
...
This fixes the following warning.
```
test/caching_test.rb:986: warning: parentheses after method name is interpreted as
test/caching_test.rb:986: warning: an argument list, not a decomposed argument
test/cases/adapters/mysql2/reserved_word_test.rb:146: warning: parentheses after method name is interpreted as
test/cases/adapters/mysql2/reserved_word_test.rb:146: warning: an argument list, not a decomposed argument
```
Ref: 65e27c8b13
2016-12-14 08:58:39 +09:00
Kasper Timm Hansen
a6d065e39f
form_with/fields: Don't output ids by default
...
Continuing 67f81cc where we decided not to output ids
by default in the new form helpers.
Went with @dhh's suggestion of just requiring ids on
fields being labelled:
https://github.com/rails/rails/issues/25197#issuecomment-231797117
Seems okay enough.
2016-12-13 21:02:36 +01:00
Rafael Mendonça França
34a1c7e284
Add CHANGELOG entry to #27042
...
[ci skip]
2016-12-13 12:01:02 -05:00
Rafael França
ddf81c5aa5
Merge pull request #27042 from kirs/yaml-schema-cache
...
Schema cache in YAML
2016-12-13 11:59:45 -05:00
Kasper Timm Hansen
04dd8b7ac7
Merge pull request #27293 from y-yagi/fix_duplicable_with_2_4
...
change return value of `duplicable?` with Ruby 2.4+
2016-12-13 08:39:49 +01:00
yuuji.yaginuma
2cb8558120
change return value of duplicable?
with Ruby 2.4+
...
`NilClass`, `FalseClass`, `TrueClass`, `Symbol` and `Numeric` can dup
with Ruby 2.4+.
Ref: https://bugs.ruby-lang.org/issues/12979
2016-12-13 07:35:36 +09:00
Kasper Timm Hansen
1373f9bdcf
Don't assign a default to webpack
.
...
Unintentionally makes `--webpack` implied on `rails new apper`.
If passed `--webpack` Thor assigns `"webpack"` to `options[:webpack]`,
so we can check for that instead of `"base"`.
2016-12-12 21:10:50 +01:00
David Heinemeier Hansson
cfdf6e1368
Add option to trigger JS framework-specific installation as part of webpack setup
2016-12-12 11:07:28 -08:00
Akira Matsuda
5d07e8a326
💅
2016-12-13 00:48:14 +09:00
Akira Matsuda
bd9e134b01
nil, true, 1, etc. don't raise on #dup since Ruby 2.4
...
https://bugs.ruby-lang.org/issues/12979
2016-12-13 00:43:56 +09:00
Akira Matsuda
b87619f945
Keep AS::XmlMini::PARSING["decimal"].call('') returning 0
...
BigDecimal('an invalid string') has changed its behavior to raise an ArgumentError since 1.3.0
https://bugs.ruby-lang.org/issues/10286
2016-12-13 00:06:08 +09:00
Akira Matsuda
414484f68d
Missing require "yaml"
2016-12-12 22:32:04 +09:00
Akira Matsuda
edf4bff77c
Oops!
...
namespace_ladder can be nil here
2016-12-12 21:34:22 +09:00
Akira Matsuda
f1878baad5
💅
...
Don't expect the caller of this method to know that the return value has an extra " "
2016-12-12 20:49:25 +09:00
Eileen M. Uchitelle
0978293a94
Merge pull request #27328 from kamipo/add_changelog_for_26687
...
Add a changelog entry for #26687 [ci skip]
2016-12-11 14:35:57 -05:00
Ryuta Kamizono
9cdf38ff34
Add a changelog entry for #26687 [ci skip]
2016-12-12 04:22:27 +09:00
Guillermo Iguaran
7e9ae610a2
Merge pull request #27330 from kamipo/remove_duplicated_line
...
Remove duplicated line
2016-12-11 10:19:20 -05:00
Ryuta Kamizono
fbb55db8e8
Remove duplicated line
2016-12-11 23:15:44 +09:00
Matthew Draper
701fc768ae
Merge pull request #27323 from kamipo/add_changelog_for_25227
...
Add a changelog entry for #25227 [ci skip]
2016-12-11 03:15:12 +10:30
Matthew Draper
2affe7067f
Merge pull request #27322 from kamipo/fix_ci_failure
...
Fix CI failure caused by #25227 and #25280 were merged at the same time
2016-12-11 03:14:46 +10:30
Ryuta Kamizono
7bce826ade
Add a changelog entry for #25227 [ci skip]
2016-12-10 23:07:45 +09:00
Ryuta Kamizono
3f7cd2c571
Fix CI failure caused by #25227 and #25280 were merged at the same time
2016-12-10 21:40:20 +09:00
Sean Griffin
753da21322
Merge pull request #25280 from kamipo/prevent_range_error_for_belongs_to_associations
...
Prevent `RangeError` for `belongs_to` associations
2016-12-10 06:21:55 -05:00
Sean Griffin
2e8dad6318
Merge pull request #25227 from kamipo/numeric_value_out_of_range
...
Translate numeric value out of range to the specific exception
2016-12-10 06:20:34 -05:00