aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prevent raising EOFError on multipart GET request.Adam Stankiewicz2012-12-103-1/+19
| | | | | | | | | | Such request can happen on Internet Explorer. When we redirect after multipart form submission, the request type is changed to GET, but Content-Type is preserved as multipart. GET request cannot have multipart body and that caused Rails to fail. It's similar fix to Rack's one: https://github.com/chneukirchen/rack/blob/8025a4ae9477d1e6231344c2b7d795aa9b3717b6/lib/rack/request.rb#L224
* Fix where.not with in clauseCarlos Antonio da Silva2012-12-072-4/+4
| | | | | | Arel::Nodes::In inherits from Arel::Nodes::Equality, so the case statement was always using the Equality operator for both scenarios, resulting in a not equal query instead.
* Merge pull request #8445 from claudiob/match_rdoc_with_6ba0f97Carlos Antonio da Silva2012-12-071-4/+4
|\ | | | | Update #where rdoc to match 6ba0f97 [ci skip]
| * Update #where rdoc to match 6ba0f97 [ci skip]claudiob2012-12-071-4/+4
|/ | | | | | | | This commit updates the rdoc of AR#where to match the changes applied in https://github.com/rails/rails/commit/6ba0f97 that is: * `where(nil)` has the same effect of `where('')`: a no op * `where` (no args) has the same effect of `where(:chain)`: to create a WhereChain
* Revert "Invert precedence of content in ActionDispatch::Static"Andrew White2012-12-074-51/+12
| | | | This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
* Move where with blank conditions test to the correct where tests fileCarlos Antonio da Silva2012-12-072-6/+6
| | | | This test does not belong to has many associations test.
* Ensure there won't be any regression with where(nil) callsCarlos Antonio da Silva2012-12-072-5/+5
| | | | | | | | | | | | | | | | | | | Consider this scenario: if params[:foo] conditions = { foo: true } end foos = Foo.where(conditions).order(:id) When params[:foo] is nil, this would call: foos = Foo.where(nil).order(:id) In this scenario, we want Foo.where(conditions) to be the same as calling Foo.all, otherwise we'd get a "NoMethodError order for WhereChain". Related to #8332.
* Merge pull request #8332 from amatsuda/ar_where_chainCarlos Antonio da Silva2012-12-075-8/+200
|\ | | | | | | | | | | | | | | Relation.where with no args can be chained with not, like, and not_like Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/query_methods.rb
| * Relation.where with no args can be chained with not, like, and not_likeAkira Matsuda2012-11-305-8/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | examples: Model.where.not field: nil #=> "SELECT * FROM models WHERE field IS NOT NULL Model.where.like name: 'Jeremy%' #=> "SELECT * FROM models WHERE name LIKE 'Jeremy%' this feature was originally suggested by Jeremy Kemper https://github.com/rails/rails/pull/5950#issuecomment-5591330 Closes #5950
* | Stop shelling out more than necessaryCarlos Antonio da Silva2012-12-071-10/+10
| |
* | Unscope update_column(s) query to ignore default scopeCarlos Antonio da Silva2012-12-063-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When applying default_scope to a class with a where clause, using update_column(s) could generate a query that would not properly update the record due to the where clause from the default_scope being applied to the update query. class User < ActiveRecord::Base default_scope where(active: true) end user = User.first user.active = false user.save! user.update_column(:active, true) # => false In this situation we want to skip the default_scope clause and just update the record based on the primary key. With this change: user.update_column(:active, true) # => true Fixes #8436.
* | Improve AR changelogCarlos Antonio da Silva2012-12-061-18/+17
| |
* | Remove method redefined warningsCarlos Antonio da Silva2012-12-061-1/+1
| |
* | Use CURRENT_TIMESTAMP since it has apparently better cross db supportCarlos Antonio da Silva2012-12-062-2/+2
| | | | | | | | | | LOCALTIMESTAMP is not support by sqlite3, and travis was giving us these errors: https://travis-ci.org/rails/rails/jobs/3535241/#L570
* | Run rake tasks all at once in rake dbs test for a speed upCarlos Antonio da Silva2012-12-061-12/+6
| | | | | | | | | | | | | | | | | | | | | | Before: Finished tests in 56.245787s, 0.2133 tests/s, 0.0000 assertions/s. 12 tests, 0 assertions, 0 failures, 0 errors, 0 skips After: Finished tests in 42.401416s, 0.2830 tests/s, 0.0000 assertions/s. 12 tests, 0 assertions, 0 failures, 0 errors, 0 skips
* | Merge pull request #8440 from steveklabnik/masterRafael Mendonça França2012-12-061-0/+3
|\ \ | | | | | | | | | | | | CHANGELOG for 78d5d6f [ci skip]
| * | CHANGELOG for 78d5d6f.Steve Klabnik2012-12-061-0/+3
|/ / | | | | | | | | It was pointed out by @giner that the CHANGELOG entry for https://github.com/rails/rails/commit/78d5d6f8688bb7c45ba9a3ef893682231130da3f wasn't included. Here it is.
* | Merge pull request #8439 from joshsusser/fixesCarlos Antonio da Silva2012-12-063-5/+5
|\ \ | | | | | | Fixes issues in test_mysql2
| * | Oracle needs table to check index existenceJosh Susser2012-12-061-3/+3
| | |
| * | convert time to stringJosh Susser2012-12-062-2/+2
| | | | | | | | | why is this a Time to start with?
* | | Change the encrypted campfire notification tokenRafael Mendonça França2012-12-061-1/+1
| | |
* | | Invert precedence of content in ActionDispatch::StaticAndrew White2012-12-064-12/+51
|/ / | | | | | | | | | | | | | | | | | | This commit inverts the precedence in ActionDispatch::Static so that dynamic content will be served before static content. This is so that precompiled assets do not inadvertently get included when running in development mode - it should have no effect in production where static files are usually handled by the web server. Closes #6421
* | Refactor tests that switch RAILS_ENV and RACK_ENVCarlos Antonio da Silva2012-12-066-63/+63
| | | | | | | | | | | | | | | | | | | | | | | | This cleanup aims to fix a build failure: https://travis-ci.org/rails/rails/jobs/3515951/#L482 Since travis always have both ENV vars set to "test", a test is failing where it's expected to output the default env "development", but "test" is the result due to RACK_ENV being set when we expect it to not be. By cleaning this duplication we ensure that changing any of these env variables will pick the right expected value.
* | Add comment about implementation of class_attributeAndrew White2012-12-061-0/+3
| | | | | | | | | | | | | | To prevent future pull requests like #8435 add a comment about the implementation of class_attribute using class_eval for performance. [ci skip]
* | adds a couple of items to the check list for stable releases [ci skip]Xavier Noria2012-12-061-0/+3
| |
* | Merge pull request #8431 from joshsusser/schemadumpAaron Patterson2012-12-051-4/+2
|\ \ | | | | | | dump schema.rb without :version option
| * | dump schema.rb without :version optionJosh Susser2012-12-051-4/+2
|/ /
* | Merge branch 'joshsusser-master' into mergeAaron Patterson2012-12-0515-58/+268
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * joshsusser-master: style cleanup Add migration history to schema.rb dump Add metadata to schema_migrations Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/schema.rb
| * | style cleanupJosh Susser2012-12-033-6/+5
| | |
| * | Add migration history to schema.rb dumpJosh Susser2012-12-029-17/+146
| | |
| * | Add metadata to schema_migrationsJosh Susser2012-12-0110-43/+125
| | | | | | | | | | | | | | | migrated_at: timestamp when migration run fingerprint: md5 hash of migration source name: filename without version or extension
* | | Merge pull request #8429 from reednj77/turbolinks-js-include-orderCarlos Antonio da Silva2012-12-051-3/+1
|\ \ \ | | | | | | | | Revert turbolinks load order requirement
| * | | Revert turbolinks load order requirementNick Reed2012-12-051-3/+1
|/ / /
* | | Fix duplicated method nameCarlos Antonio da Silva2012-12-051-2/+1
| | | | | | | | | | | | [ci skip]
* | | Merge pull request #8427 from kennyj/support_rack_envRafael Mendonça França2012-12-057-5/+67
|\ \ \ | | | | | | | | Add ENV['RACK_ENV'] support to rake runner/console/server.
| * | | Add ENV['RACK_ENV'] support to rake runner/console/server.kennyj2012-12-067-5/+67
|/ / /
* | | Merge pull request #8424 from kennyj/tiny_fixes_20121206Xavier Noria2012-12-051-3/+7
|\ \ \ | | | | | | | | fix warning: possibly useless use of a constant in void context
| * | | silence warning: possibly useless use of a constant in void contextkennyj2012-12-061-3/+7
|/ / /
* | | Merge pull request #8371 from freegenie/5396-conditional-fragment-cachingRafael Mendonça França2012-12-053-1/+83
|\ \ \ | | | | | | | | | | | | | | | | Allow fragment cache to accept :if and :unless options. Closes #5396
| * | | Allow fragment cache to accept :if and :unless optionsFabrizio Regini2012-12-053-1/+83
| | | | | | | | | | | | | | | | [Stephen Ausman + Fabrizio Regini]
* | | | Merge pull request #8412 from ↵Rafael Mendonça França2012-12-051-18/+14
|\ \ \ \ | |/ / / |/| | | | | | | | | | | JoeyButler/action_dispatch_routing_mapper_refactoring Extract method refactoring.
| * | | Extract method refactoring in ActionDispatch::Routing::SingletonResource.Joey Butler2012-12-051-18/+14
| | | |
* | | | Merge pull request #8404 from freegenie/filter_redirectsAndrew White2012-12-059-5/+96
|\ \ \ \
| * | | | Adding filter capability to ActionController logsFabrizio Regini2012-12-059-5/+96
| | | | |
* | | | | Merge pull request #8421 from claudiob/remove_unicode_blanksCarlos Antonio da Silva2012-12-0527-49/+49
|\ \ \ \ \ | |/ / / / |/| | | | Replace comments' non-breaking spaces with spaces [ci skip]
| * | | | Replace comments' non-breaking spaces with spacesclaudiob2012-12-0427-49/+49
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
* | | | Fix Active Record validation error messages markup in guidesCarlos Antonio da Silva2012-12-044-61/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The other way it was not marking the text as italic, it was showing the underlines as normal text. Also fixes some code examples indentation and # => marks in Active Model and Active Record guides. [ci skip]
* | | | Improve the Active Model guide [ci skip]Carlos Antonio da Silva2012-12-041-33/+27
| | | |
* | | | Merge pull request #8418 from ershad/masterCarlos Antonio da Silva2012-12-041-1/+1
|\ \ \ \ | | | | | | | | | | Fixing a spelling mistake [ci skip]
| * | | | Fixing a couple of spelling mistakesErshad K2012-12-041-1/+1
|/ / / /