| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Ensure that status codes are logged properly
|
| |
| |
| |
| |
| |
| | |
Needed to move AC::Metal::Instrumentation before AM::Metal::Rescue
so that status codes rendered from rescue_from blocks are logged
properly.
|
|\ \
| |/
|/| |
Fix Rails::Generators::Actions#environment when env is passed
|
| | |
|
|\ \
| | |
| | | |
ActiveModel support for the :include serialization option
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit moves support for the :include serialization option for
serializing associated objects out of ActiveRecord in into ActiveModel.
The following methods support the :include option:
* serializable_hash
* to_json
* to_xml
Instances must respond to methods named by the values of the :includes
array (or keys of the :includes hash). If an association method returns
an object that is_a?(Enumerable) (which AR has_many associations do), it
is assumed to be a collection association, and its elements must respond
to :serializable_hash. Otherwise it must respond to :serializable_hash
itself.
While here, fix #858, XmlSerializer should not singularize already
singular association names.
|
| | |
| | |
| | |
| | |
| | | |
One duplicate was eliminated: test_to_xml_including_methods/
test_methods_are_called_on_object.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Optimization of ActiveModel's match_attribute_method?
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Raise an ArgumentError if user passing less number of argument in the dynamic finder
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
dynamic finder
The previous behavior was unintentional, and some people was relying on it. Now the dynamic finder will always expecting the number of arguments to be equal or greater (so you can still pass the options to it.)
So if you were doing this and expecting the second argument to be nil:
User.find_by_username_and_group("sikachu")
You'll now get `ArgumentError: wrong number of arguments (1 for 2).` You'll then have to do this:
User.find_by_username_and_group("sikachu", nil)
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Checking with to_s. As regexp fail with 1.8.7
|
| |/ / / / |
|
|/ / / /
| | | |
| | | |
| | | | |
warnings should be shown, and fixed at the source and 2) the code is slow. Fixes #1937.
|
|\ \ \ \
| | | | |
| | | | | |
Fix a wrong assertion on url_helper_test, and add missing `#html_safe?` a
|
| | |/ /
| |/| |
| | | |
| | | | |
be in its method
|
|\ \ \ \
| | | | |
| | | | | |
Render partial invalid check
|
| | | | | |
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | | |
test/cases/fixtures_test.rb when UTC and local time occur on different dates." I am pretty sure this was an incorrect fix, and it still failed in certain circumstances anyway. I am now unable to reproduce the original failure I was experiencing so will leave it for now and see if this pops up again.
This reverts commit e4479b2f1bc54edf155408d51dd3236955150ce1.
|
|\ \ \ \
| |_|_|/
|/| | | |
As we are adding db folder in it. Required in test also.
|
|/ / / |
|
| | |
| | |
| | |
| | | |
assets:clean, just do that
|
| | | |
|
|\ \ \
| | | |
| | | | |
Better formatting of rake routes (issue #1991)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This route:
match 'foo/:id' => RackApp, :id => /[A-Z]\d{5}/
is shown as:
/foo/:id(.:format) RackApp {:id=>/[A-Z]\d{5}/}
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously it was:
{:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/}
Now it becomes:
photos#show {:id=>/[A-Z]\d{5}/}
|
|\ \ \
| | | |
| | | | |
Adds gem helper rake tasks to engines generator
|
| | | |
| | | |
| | | |
| | | | |
3-1-stable, #2103
|
| | | | |
|
|\| | |
| | | |
| | | | |
Added db to gemspec so migrations are packaged
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
Fix wildcard route code example in changelog
|
|/ / |
|
|\ \
| | |
| | | |
ported test from pull request #2071 to master
|
| | | |
|
|\ \ \
| | | |
| | | | |
Patch for https://github.com/rails/rails/issues/2059
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Cache key was incorrectly using timezone-dependent record#updated_at when it should be using a timezone-independent value to generate the cache key
Minor refactoring to cache_key timezone test
Closes #2059
Adds a test to validate the format of the cache_key for nil and present updated_at values
Correctly handles updated_at == nil
|
|\ \ \ \
| |_|/ /
|/| | | |
Bugfix by stopping find_in_batches using the records after yielding.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently if the code that calls .find_in_batches modifies the yielded array in place then .find_in_batches can enter an infinite loop searching with ruby object ids in the database instead of the primary key of records in the database. This happens because it naively assumes the yielded array hasn't been modified before calling #id on the last object in the array. And ruby (1.8 at least) alias' #id to #object_id so an integer is still returned no matter what the last object is.
By moving finding the #id of the last object before yielding the array it means the calling code can do whatever it wants to the array in terms of modifying it in place, and .find_in_batches doesn't care.
|
|\ \ \ \
| |_|/ /
|/| | | |
missing magic comments
|