aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Reduce duplication when generating translationsMaarten Claes2015-01-224-34/+47
|
* Convert with `to_model` before calling ActiveModel methods on `object`Maarten Claes2015-01-222-8/+14
|
* Merge pull request #18643 from kaspth/renderer-normalize_keys-speedupRafael Mendonça França2015-01-221-9/+6
|\ | | | | Speed up ActionController::Renderer `normalize_keys` by ~28%.
| * Speed up `normalize_keys` by removing dup step.Kasper Timm Hansen2015-01-221-9/+6
| | | | | | | | | | | | | | | | Previously env was duplicated and then had it's keys mutated. This iterates through the hash twice. Using `transform_keys`, duplication and key mutation is a single iteration. `convert_symbols` was renamed to `http_header_format`.
* | Merge pull request #18644 from rwarbelow/fix-wording-of-css-manifestZachary Scott2015-01-222-6/+4
|\ \ | |/ |/| fix wording of CSS manifest instructions [ci skip]
| * fix wording of CSS manifest instructionsRachel Warbelow2015-01-222-6/+4
|/
* Merge pull request #18641 from splattael/disable-ar-jdbc-masterRafael Mendonça França2015-01-221-1/+0
|\ | | | | Disable builds AR-JDBC against master
| * Disable builds AR-JDBC against masterPeter Suschlik2015-01-221-1/+0
| | | | | | | | | | | | | | Currently, bundling `activerecord-jdbc-adapter`'s master branch seems to be broken. See jruby/activerecord-jdbc-adapter#614 This commit partially reverts #12107
* | Merge pull request #18642 from y-yagi/active_record_validations_guideAbdelkader Boudih2015-01-221-1/+1
|\ \ | | | | | | fix regexp for validate an integer in guides [ci skip]
| * | fix regexp for validate an integer in guides [ci skip]yuuji.yaginuma2015-01-221-1/+1
| |/
* | Merge pull request #18636 from josh/railties-remove-config-assetsRafael Mendonça França2015-01-222-22/+1
|\ \ | | | | | | Remove config.assets
| * | Remove config.assetsJoshua Peek2015-01-212-22/+1
| | | | | | | | | | | | Provided by sprockets-rails plugin
* | | Merge pull request #18546 from brainopia/action_view_renderRafael Mendonça França2015-01-2211-6/+273
|\ \ \ | |_|/ |/| | A shortcut to setup controller environment
| * | Add ApplicationController.renderer initializer [ci skip]brainopia2015-01-221-0/+6
| | |
| * | Add ActionController::Base.renderbrainopia2015-01-223-0/+10
| | |
| * | Add ActionController::Rendererbrainopia2015-01-225-0/+216
| | | | | | | | | | | | Render arbitrary templates outside of controller actions
| * | Add ActionController#build_with_envbrainopia2015-01-221-0/+6
| | | | | | | | | | | | | | | To have an easier way to setup a controller instance with custom environment
| * | Support `:assigns` option when rendering with controllers/mailers.brainopia2015-01-223-2/+18
| | |
| * | Add `ActionController::Metal#set_request!`brainopia2015-01-213-4/+17
| | | | | | | | | | | | | | | Add `ActionController::Metal#set_request!` to set a request on controller instance without calling dispatch.
* | | Merge pull request #18635 from ↵Yves Senn2015-01-221-1/+1
|\ \ \ | | | | | | | | | | | | | | | | BenMorganIO/use-two-spaces-instead-of-one-for-wrap-params use two spaces instead of one for include root in json
| * | | use two spaces instead of one for include root in jsonBen A Morgan2015-01-211-1/+1
| | |/ | |/|
* | | Merge pull request #18637 from diogobenica/masterArthur Nogueira Neves2015-01-211-1/+11
|\ \ \ | |/ / |/| | Add :formats to options list of render documentation.
| * | Add :formats to options list of render documentation.Diogo Benicá2015-01-211-1/+11
|/ /
* | Don't error when invalid json is assigned to a JSON columnSean Griffin2015-01-213-1/+15
| | | | | | | | | | | | | | Keeping with our behavior elsewhere in the system, invalid input is assumed to be `nil`. Fixes #18629.
* | Merge pull request #18322 from morgoth/add-error-codesRafael Mendonça França2015-01-214-23/+154
|\ \ | | | | | | Add ActiveModel::Errors#codes
| * | Add ActiveModel::Errors#detailsWojciech Wnętrzak2015-01-204-23/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be able to return type of validator, one can now call `details` on Errors instance: ```ruby class User < ActiveRecord::Base validates :name, presence: true end ``` ```ruby user = User.new; user.valid?; user.errors.details => {name: [{error: :blank}]} ```
* | | Merge pull request #18628 from yahonda/if_exists_testingsRafael Mendonça França2015-01-212-3/+3
|\ \ \ | | | | | | | | Replace `if exists` with `table_exists?` and drop table with `drop_table`
| * | | Replace `if exists` with `table_exists?` and drop table statement with ↵Yasuo Honda2015-01-212-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `drop_table` since 'drop table if exists' statement does not always work with some databases such as Oracle. also Oracle drop table statement will not drop sequence objects.
* | | | Fix test case class in the testing guide [ci skip]Rafael Mendonça França2015-01-211-1/+1
| | | |
* | | | Merge pull request #18626 from splattael/jruby-headRafael Mendonça França2015-01-211-2/+2
|\ \ \ \ | | | | | | | | | | Travis: Test on jruby-head only for now
| * | | | Travis: Test on jruby-head only for nowPeter Suschlik2015-01-211-2/+2
|/ / / / | | | | | | | | | | | | Arel head does not support 1.9 anymore.
* | | | Merge pull request #18619 from ↵Carlos Antonio da Silva2015-01-211-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | morgoth/add-missing-dependency-to-activemodel-naming Add missing AS core extension dependency
| * | | | Add missing AS core extension dependencyWojciech Wnętrzak2015-01-211-0/+1
| |/ / /
* | | | Merge pull request #18621 from morgoth/error-message-on-validation-guidesCarlos Antonio da Silva2015-01-211-1/+2
|\ \ \ \ | | | | | | | | | | Add missing options to Error Message Interpolation guide [CI skip]
| * | | | Add missing options to Error Message Interpolation guide [CI skip]Wojciech Wnętrzak2015-01-211-1/+2
| |/ / /
* | | | Merge pull request #18620 from mechanicles/change-a-to-anXavier Noria2015-01-211-1/+1
|\ \ \ \ | |/ / / |/| | | Change 'a' to 'an' for 'attribute' word [ci skip]
| * | | Change 'a' to 'an' for 'attribute' word [ci skip]Santosh Wadghule2015-01-211-1/+1
|/ / /
* / / Introduce `ActiveRecord::Base#accessed_fields`Sean Griffin2015-01-207-1/+88
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method can be used to see all of the fields on a model which have been read. This can be useful during development mode to quickly find out which fields need to be selected. For performance critical pages, if you are not using all of the fields of a database, an easy performance win is only selecting the fields which you need. By calling this method at the end of a controller action, it's easy to determine which fields need to be selected. While writing this, I also noticed a place for an easy performance win internally which I had been wanting to introduce. You cannot mutate a field which you have not read. Therefore, we can skip the calculation of in place changes if we have never read from the field. This can significantly speed up methods like `#changed?` if any of the fields have an expensive mutable type (like `serialize`) ``` Calculating ------------------------------------- #changed? with serialized column (before) 391.000 i/100ms #changed? with serialized column (after) 1.514k i/100ms ------------------------------------------------- #changed? with serialized column (before) 4.243k (± 3.7%) i/s - 21.505k #changed? with serialized column (after) 16.789k (± 3.2%) i/s - 84.784k ```
* | Merge pull request #18557 from tjschuck/sanitize_doc_fixesRafael Mendonça França2015-01-201-76/+51
|\ \ | | | | | | SanitizeHelper documentation formatting fixes + rewrite
| * | Single instead of double quotes T.J. Schuck2015-01-201-2/+2
| | | | | | | | | [ci skip]
| * | Rewrite SanitizeHelper docsT.J. Schuck2015-01-201-77/+50
| | |
| * | Fix code formatting in sanitize docsT.J. Schuck2015-01-201-9/+11
|/ /
* | Merge pull request #18614 from arthurnn/rollback_records_parityRafael Mendonça França2015-01-202-6/+6
|\ \ | | | | | | TransactionManager should call rollback records
| * | TransactionManager should call rollback recordsArthur Neves2015-01-202-6/+6
|/ /
* | Merge pull request #18458 from brainopia/fix_after_commit_for_fixturesJeremy Kemper2015-01-205-22/+51
|\ \ | | | | | | Support after_commit callbacks in transactional fixtures
| * | after_commit runs after transactions with non-joinable parentsbrainopia2015-01-165-22/+51
| | | | | | | | | | | | | | | | | | after_commit callbacks run after committing a transaction whose parent is not `joinable?`: un-nested transactions, transactions within test cases, and transactions in `console --sandbox`.
* | | tests, use `drop_table if_exists: true` in our test suite.Yves Senn2015-01-209-13/+13
| | |
* | | Merge pull request #18597 from kamipo/add-if-exists-to-drop-tableYves Senn2015-01-205-3/+29
|\ \ \ | | | | | | | | Add an `:if_exists` option to `drop_table`
| * | | Add an `:if_exists` option to `drop_table`Stefan Kanev2015-01-195-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If set to `if_exists: true`, it generates a statement like: DROP TABLE IF EXISTS posts This syntax is supported in the popular SQL servers, that is (at least) SQLite, PostgreSQL, MySQL, Oracle and MS SQL Sever. Closes #16366.
* | | | Fix bind value copying from subqueried relationsSean Griffin2015-01-193-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the old implementation, the bind values were created, and then we search the attributes for `Relation` objects, and merge them. This completely ignores the order that the actual `where` clause will use. If all non-relation where parameters are before the relations, it will work. However, if we query on both a relation and a value, with the value coming second, it breaks. The order of the hash should not affect the final query (especially since hashes being ordered is an implementation detail)