| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
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
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Fixed the application_controller require_dependency path generated by the app generator
|
|/ / /
| | |
| | |
| | | |
app generator
|
| | |
| | |
| | |
| | |
| | |
| | | |
To facilitate the use of ActiveSupport::Testing::Performance outside
of a Rails application conditionally check for the presence of
Rails::VERSION::STRING before including it in the environment string.
|
|\ \ \
| | | |
| | | | |
bundle exec rake assets:precompile shouldn't fail quietly.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If JavaScript runtime is not installed, execjs fails with error quietly,
while tests continue to run. This should not happen since it causes tests
to fail for unknown reason (#6621).
This commit assures that if JavaScript runtime is not installed, an assertion
is raised.
|
|\ \ \
| | | |
| | | | |
add instance_accessor option to config_accessor
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changes:
* Add `instance_accessor` option to opt out of the instance writer and
instance reader methods.
* Raises a NameError if the name of the attribute is not valid.
* Update documentation and tests.
* Add CHANGELOG entry in activesupport.
|
|\ \ \
| | | |
| | | | |
Resolver tests fail if mysql adapter not installed
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
being able to run the sqlite3 tests without that gem. This fix ensures
the tests will only run if the mysql gem is installed.
A better solution might be to move these tests into the per-adapter tests,
and test each adapter's resolver.
|
|\ \ \
| | | |
| | | | |
One-liner code for logger in ActionView::Helpers::ControllerHelper
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Accept a block in FormHelper#button
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
Fixed the Gemfile when gemspec is skipped in the 'rails plugin new' command
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
Metal controller doesn't have logger method, check it and then delegate
|
| |/ |
|
|\ \
| |/
|/| |
Fix #6591 Rails 3.2.5 Regression: incorrect _changed? for datetimes
|
| | |
|
|/ |
|
|\
| |
| | |
Updated guide to say Rails 4.0 requires 1.9.3 or higher, not Rails 3.2.
|
| | |
|
|\ \
| |/
|/| |
a test case that ensures AR::Relation#merge can merge associations
|
|/ |
|
|
|
|
|
|
| |
just a consolidation of the changelogs with minimal formatting
[ci skip]
|
|\ |
|
| | |
|