| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| | |
takkanm/fix-character-class-duplicated-range-warning
fix warning in Ruby2.0.0
|
| |
| |
| |
| |
| |
| |
| | |
```
rails/activesupport/lib/active_support/multibyte/chars.rb:136: warning:
character class has duplicated range: /\b('?[\S])/
```
|
|\ \
| |/
|/| |
Address ORA-00911 errors because of the heading underscore.
|
|/ |
|
|\
| |
| | |
Fix that #exists? can blow up with ThrowResult exception
|
|/
|
|
|
|
|
|
|
| |
reflection.
ActiveRecord::FinderMethods#construct_limited_ids_condition will raise
ThrowResult if the limited reflection comes back empty. The other callers
of #construct_limited_ids_condition handle this exception (more specifically,
the callers of construct_relation_for*), but #exists? didn't until now.
|
| |
|
|
|
|
|
|
|
|
| |
This behavior was added in be4ecdcc87984e9421ff5d5c90d33f475e0fbc01.
Closes #1139.
Fixes #2553, #1141, #1623 and #2062.
|
|
|
|
|
|
|
| |
others happy that do not work without a column alias.
Conflicts:
activerecord/lib/active_record/relation/finder_methods.rb
|
|\
| |
| | |
Fix #6635. We should call Scoping methods, before calling Array methods.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two possible scenarios where the @mass_assignment_options
instance variable can become corrupted:
1. If the assign_attributes doesn't complete correctly, then
subsequent calls to a nested attribute assignment method will use
whatever options were passed to the previous assign_attributes call.
2. With nested assign_attributes calls, the inner call will overwrite
the current options. This will only affect nested attributes as the
attribute hash is sanitized before any methods are called.
To fix this we save the current options in a local variable and then
restore these options in an ensure block.
|
|\
| |
| | |
Build fix broken here 03f2249153ae4d2078646e6796d8b9e5ef747fba
|
|/ |
|
|\
| |
| | |
Add Prompt to 404 & 500 Pages to Check Logs in Production
|
| |
| |
| | |
When new programmers push their code to a production server and receive an error they often don't know to check the logs, this simple reminder will help. Most professional applications have custom error pages so this change shouldn't affect them. The wording of the message should not confuse non-developer visitors.
|
| | |
|
|\ \
| | |
| | | |
Notify A User they Have Pending Migrations
|
| | |
| | |
| | | |
App should raise error on page_load
|
| | |
| | |
| | | |
can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
|
| | |
| | |
| | | |
if a rails project needs to be migrated ActiveRecord::Migrator.needs_migration? will be true or false if the current version matches the last version.
|
|\ \ \
| | | |
| | | | |
Fix fragile #assert_queries implementation and usages.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Several tests that passed when run in the order they are loaded
by rake test were failing when run in different sequences due to
problems with the implementation of assert_queries and
assert_no_queries as well as incorrect assumptions made about
how many queries might be executed by a database adapter in
various cases.
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
This is an obsolete method from the very early days,
apparently it was used circa 2004 because STI support
was not smart enough. This method is not public
interface, and we are heading a major version, so
removal seems right.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
ActiveRecord#attributes optimization: minimize objects created
|
|/ /
| |
| |
| | |
Fix for a test failing after: 00ff0a6776
|
|\ \
| | |
| | | |
Compact array of values added to PermissionSet instance
|
| | | |
|
|\ \ \
| | | |
| | | | |
Plugin gen fix
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
if we are passing -T which is skip_test_unit
See issue #6673 for more details.
I saw that we are not creating dummy app even if
we do skip_test_unit.
Fixes #6673
|
| | | | |
|
|/ / /
| | |
| | |
| | | |
(closes #6672)
|
|\ \ \
| | | |
| | | | |
Skip two tests with polymorphic if current adapter is Oracle Adapter.
|
| |/ /
| | |
| | |
| | | |
because Oracle Adapter does not support foreign keys if :polymorphic => true is used.
|
|\ \ \
| |/ /
|/| | |
change AMS::JSON.include_root_in_json default value to false
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changes:
* Update `include_root_in_json` default value to false for default value
to false for `ActiveModel::Serializers::JSON`.
* Remove unnecessary change to include_root_in_json option in
wrap_parameters template.
* Update `as_json` documentation.
* Fix JSONSerialization tests.
Problem:
It's confusing that AM serializers behave differently from AR,
even when AR objects include AM serializers module.
class User < ActiveRecord::Base; end
class Person
include ActiveModel::Model
include ActiveModel::AttributeMethods
include ActiveModel::Serializers::JSON
attr_accessor :name, :age
def attributes
instance_values
end
end
user.as_json
=> {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true}
# root is not included
person.as_json
=> {"person"=>{"name"=>"Francesco", "age"=>22}}
# root is included
ActiveRecord::Base.include_root_in_json
=> false
Person.include_root_in_json
=> true
# different default values for include_root_in_json
Proposal:
Change the default value of AM serializers to false, update
the misleading documentation and remove unnecessary change
to false of include_root_in_json option with AR objects.
class User < ActiveRecord::Base; end
class Person
include ActiveModel::Model
include ActiveModel::AttributeMethods
include ActiveModel::Serializers::JSON
attr_accessor :name, :age
def attributes
instance_values
end
end
user.as_json
=> {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true}
# root is not included
person.as_json
=> {"name"=>"Francesco", "age"=>22}
# root is not included
ActiveRecord::Base.include_root_in_json
=> false
Person.include_root_in_json
=> false
# same behaviour, more consistent
Fixes #6578.
|
|\ \ \
| | | |
| | | | |
Add ActiveRecord::Base#destroy!
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Reduce number of String instance
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Module#methods are Symbols in Ruby >= 1.9
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
MiniTest::Spec shipped with Ruby >= 1.9.3 always responds_to __name__
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
fix meaningless test case
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Module#instance_methods returns an Array of Symbols in Ruby >= 1.9
So this was not actually testing anything
|