| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we are rescuing from an error, it's a brittle approach to do checks
with regular expressions on the raised message because it may change in
in the future and error messages are different across implementations.
The NameError API could be improved at the MRI level but for now we need
to rely on its #name. A #== check will only pass for top level constants
or only when the last constant of the path is missing so we need to rely
on #include? instead. For instance:
begin
Namespace::Foo
rescue NameError => e
e.name # => :Namespace
end
However, if the name-space already exists, only the name of the first
missing constant in the path is returned (e.g. for Math::PHI, the name
would be :PHI). JRuby will return a fully qualified name (:"Math::PHI").
We need to keep the == check for 1.9 compatibility since const_get will
raise a NameError with a name attribute set to the given string if it's
one of "::" or "".
See http://git.io/jnSN7g for further information.
|
|\
| |
| | |
GET request should not write to database note added. [ci skip]
|
| | |
|
|\ \
| | |
| | | |
Add missing test case for Array#to_sentence, collect all test cases for Object#to_param at one place and avoid repitition
|
|/ /
| |
| |
| | |
Object#to_param at one place and avoid repitition
|
|\ \
| | |
| | | |
Move array test files under array
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
[ci skip]
This fixes the broken code block rendering and indents the examples
within the parameter list.
|
|\ \ \
| | | |
| | | | |
[ci skip] fix doc typo for validates_uniqueness_of
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | | |
Give password_confirmation div the "field" class in the scaffold generator "_form" partial
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix json autoload
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`Time#as_json`, `Date#as_json` and `DateTime#as_json` incorrectly depends on a
delegation that is set up in `active_support/json/encoding`. We cannot simply
require that file in `core_ext/object/json` because it would cause a circular
dependency problem (see #12203 for background). We should instead rely on AS's
autoload to load that file for us on-demand.
To trigger autoload correctly, we need to reference the `AS::JSON::Encoding`
constant instead of using the delegated version.
Fixes #16131.
|
| |/ / / |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closes #16163
Adding attachments after a call to `mail` will result in invalid emails.
This is related to the fact, that `mail` is making the required preparations
before the email is ready to be sent. These change depending on your
added attachments.
|
|\ \ \
| |/ /
|/| | |
Define Hash#to_query and set Hash#to_param as alias to it; with test cases
|
| | | |
|
|\ \ \
| | | |
| | | | |
Move object test files under object
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
remove blank lines at the start of the ActiveRecord files
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | | |
we know the routes should not be "optimized" when mounting an
application
|
| | |
| | |
| | |
| | |
| | | |
this caching doesn't increase performance, but does increase complexity.
remove it for now and find better ways to speed up this code.
|
|\ \ \
| | | |
| | | | |
Added documentation for change_table
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Transactions refactoring
|
| | | | |
| | | | |
| | | | |
| | | | | |
Also add test to assets the savepoint name
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add a transaction manager per connection, so it can controls the
connection responsibilities.
Delegate transaction methods to transaction_manager
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The finishing variable on the transaction object was a work-around for
the savepoint name, so after a rollback/commit the savepoint could be
released with the previous name.
related:
9296e6939bcc786149a07dac334267c4035b623a
60c88e64e26682a954f7c8cd6669d409ffffcc8b
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
[ci skip]
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
remove empty unused method
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Extract iterator method in AR::SchemaDumper
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Gems which wish to tie into ActiveRecord::SchemaDumper need to
duplicate this logic currently. [Foreigner] is one such example, as is a
library I'm currently working on but which hasn't been released yet:
def tables_with_foreign_keys(stream)
tables_without_foreign_keys(stream)
@connection.tables.sort.each do |table|
next if ['schema_migrations', ignore_tables].flatten.any? do |ignored|
case ignored
when String; table == ignored
when Regexp; table =~ ignored
else
raise StandardError, 'ActiveRecord::SchemaDumper.ignore_tables accepts an array of String and / or Regexp values.'
end
end
foreign_keys(table, stream)
end
end
[Foreigner]: https://github.com/matthuhiggins/foreigner/blob/master/lib/foreigner/schema_dumper.rb#L36-L43
Extract the skip logic to a method, making it much simpler to follow
this same behavior in gems that are tying into the migration flow and
let them dump only tables that aren't skipped without copying this block
of code. The above code could then be simplified to:
def tables_with_foreign_keys(stream)
tables_without_foreign_keys(stream)
@connection.tables.sort.each do |table|
foreign_keys(table, stream) unless ignored?(table)
end
end
It also, in my opinion, simplifies the logic on ActiveRecord's side, and
clarifies the intent of the skip logic.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
No verbose backtrace by db:drop when database does not exist.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
make `adapter_test` run order independently.
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Fix example code of EachValidator [ci skip]
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We have to specify the `:title` option to really use the
`TitleValidator` defined above.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
eileencodes/fix-documentation-that-mentions-macro-instance-var
Fix documentation for `@macro` and reflection types
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Since `@macro` doesn't exist anymore and these reflections are no
longer AssociationReflections but their own types of reflections
based on macro I updated the documentation to match the changes I
made in #16089 and #16198. An `AssociationReflection` that had a
`@macro` of `:has_many` now is a `HasManyReflection`
|
|\| | | | | |
| |_|_|_|_|/
|/| | | | | |
Fix protect_from_forgery docs [ci-skip]
|
|/ / / / / |
|
| | | | |
| | | | |
| | | | |
| | | | | |
tracker, but only half-ways. You can add that layout option on the same render call, and both templates should be added to the dependency tree. But thats going to require a more serious rework of the tracker. Please do help fix this part of it too. For now, render layout needs to be on its own line.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
[ci skip] Fix documentation of SQLite3Adapter.columns where SQLite3Column was removed in e781aa31fc52a7c696115302ef4d4e02bfd1533b
|
| | | | | |
|