aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Merge pull request #24313 from ↵Kasper Timm Hansen2016-03-251-1/+0
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gaurav2728/remove_unused_set_in_action_view_template_type set in no more used in ActionView::Template::Types
| * | | | | | | | set in no more used in ActionView::Template::TypesGaurav Sharma2016-03-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initially set is used for template type https://github.com/rails/rails/commit/67f55e28 after this commit https://github.com/rails/rails/commit/91f2ad36 it’s not require
* | | | | | | | | Merge pull request #24312 from prathamesh-sonpatki/fix-cl-typosKasper Timm Hansen2016-03-252-2/+2
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Fix typo in Action Pack changelog [ci skip]
| * | | | | | | | Fix typo in Action Pack changelog [ci skip]Prathamesh Sonpatki2016-03-252-2/+2
|/ / / / / / / /
* | | | | | | | Revert "Ensure `config.active_record.time_zone_aware_types` is always set"Rafael Mendonça França2016-03-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 43ccebc1db072ba0c96a67de0b3db78fd8fd0973. This is not fixing the configuration problem since we are assigning to the ActiveRecord::Base not the configuration. See #24303.
* | | | | | | | Apply scale before precision when coercing floats to decimalSean Griffin2016-03-242-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since precision is always larger than scale, it can actually change rounding behavior. Given a precision of 5 and a scale of 3, when you apply the precision of 5 to `1.25047`, the result is `1.2505`, which when the scale is applied would be `1.251` instead of the expected `1.250`. This issue appears to only occur with floats, as scale doesn't apply to other numeric types, and the bigdecimal constructor actually ignores precision entirely when working with strings. There's no way we could handle this for the "unknown object which responds to `to_d`" case, as we can't assume an interface for applying the scale. Fixes #24235
* | | | | | | | Merge pull request #24292 from arthurnn/arthurnn/pk_sequence_klassArthur Nogueira Neves2016-03-242-2/+14
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Move sequence value methods to Model level
| * | | | | | | | Move sequence value methods to Model levelArthur Neves2016-03-242-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `prefetch_primary_key?` and `next_sequence_value` methods live in the connection level at the moment, that make sense when you are generating the sequence from the database, in the same connection. Which is the use case today at the Oracle and Postgres adapters. However if you have an service that generates IDs, that has nothing to do with the database connection, and should not be fetched from there. Another use case, is if you want to use another connection to fetch IDs, that would not be possible with the current implementation, however when we move those methods to the model level, you can use a new connection there. Also this makes easier for gems to add behavior on those methods.
* | | | | | | | | Memoize user provided defaults before type castingSean Griffin2016-03-243-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a proc is given as a default value, the form builder ends up displaying `Proc#to_s` when the default is used. That's because we didn't handle the proc until type casting. This issue technically can occur any time that a proc is the value before type casting, but in reality the only place that will occur is when a proc default is provided through the attributes API, so the best place to handle this edge case is there. I've opted to memoize instead of just moving the `Proc#call` up, as this made me realize that it could potentially interact very poorly with dirty checking. The code here is a little redundant, but I don't want to rely on how `value_before_type_cast` is implemented in the super class, even if it's just an `attr_reader`. Fixes #24249 Close #24306
* | | | | | | | | Merge pull request #24305 from chrisarcand/reload-ar-cache-after-migrationsArthur Nogueira Neves2016-03-242-2/+14
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Make 'migrate' clear the schema cache afterward
| * | | | | | | | | Make 'migrate' clear the schema cache afterwardChris Arcand2016-03-242-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without clearing the caches afterward, removals done in migrations would not be reflected in a separate task in the same process. That is, given a table with a migration to remove a column, the schema cache would still reflect that a table has that in something such as the 'db:seed' task: `rake db:migrate db:seed` (A common thing to do in a script for a project ala `bin/setup`) vs `rake db:migrate && rake db:seed` (Two processes) The first would not reflect that the column was removed. The second would (cache reset).
* | | | | | | | | | Cable: fix Faye periodic timer shutdown typoJeremy Daer2016-03-241-1/+1
|/ / / / / / / / /
* | | | | | | | | Merge pull request #24303 from gsamokovarov/fix-timezone-deprication-warningRafael França2016-03-241-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix a tip in Active Record time attributes deprecation
| * | | | | | | | | Fix a tip in Active Record time attributes deprecationGenadi Samokovarov2016-03-241-1/+1
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have hit this deprecation in a newly created Rails 5 application and the suggested tip lead me to a `NoMethodError`. It's not trivial to actually make the following work, because of the ActiveRecord::Base class attributes setting dance in the Active Record railtie. config.active_record.time_zone_aware_types << :time Decided to suggest setting it explicitly to the values we need. [ci skip]
* | | | | | | | | Merge pull request #24297 from ojab/masterRafael França2016-03-242-6/+21
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Use Range#cover? for Date inclusion validator
| * | | | | | | | | Use Range#cover? for Date inclusion validatorojab2016-03-241-3/+4
| | | | | | | | | |
| * | | | | | | | | Add edge cases to Time/Date/DateTime inclusion validation testsojab2016-03-241-3/+17
| | | | | | | | | |
* | | | | | | | | | Merge pull request #24254 from vijayagrawal18/custom-context-documentationप्रथमेश Sonpatki2016-03-241-0/+19
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | Added missing custom context validation documentation
| * | | | | | | | | [ci skip] Added missing custom context validationVijay Kumar Agrawal2016-03-241-0/+19
|/ / / / / / / / /
* | | | | | | | | Merge pull request #24295 from yui-knk/add_test_for_unknown_migration_versionMatthew Draper2016-03-252-1/+4
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Change for `ActiveRecord::Migration.[]` to raise `ArgumentError` inst…
| * | | | | | | | Change for `ActiveRecord::Migration.[]` to raise `ArgumentError` instead of ↵yui-knk2016-03-242-1/+4
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `RuntimeError` The error is raised because user passed invalid version number to a public api of `ActiveRecord`, so `ArgumentError` is more suitable. And add a test case checking if an error is raised when unknown migration version is passed, because these test cases are not implemented.
* | | | | | | | Merge pull request #24164 from prathamesh-sonpatki/fix-application-mailerRafael França2016-03-233-2/+26
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Correctly generate application_mailer.rb in mountable engines
| * | | | | | | Correctly generate application_mailer.rb in mountable enginesPrathamesh Sonpatki2016-03-123-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Followup of https://github.com/rails/rails/pull/24161.
* | | | | | | | Merge pull request #24285 from tbraun89/patch-1Rafael França2016-03-231-2/+2
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | fixed spelling in the mattr_reader documentation
| * | | | | | | fixed spelling in the attribute_accessors docuTorsten Braun2016-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | mattr_writer to mattr_reader
| * | | | | | | fixed spellin in the mattr_reader documentationTorsten Braun2016-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | renamed cattr_reader to mattr_reader
* | | | | | | | Merge pull request #24037 from ↵Jeremy Daer2016-03-231-53/+34
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jeremy/implicit-render-raises-on-browser-GET-requests-only Are you missing that template or did you omit it on purpose?
| * | | | | | | | Refinement of our "are you missing a template or did you omit it on ↵Jeremy Daer2016-03-031-53/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | purpose?" heuristics Narrows the "are you in a browser, viewing the page?" check to exclude non-GET requests. Allows content-less APIs to use implicit responses without having to set a fake request format. This will need further attention. If you forget to redirect from a POST to a GET, you'll get a 204 No Content response that browsers will typically treat as… do nothing. It'll seem like the form just didn't work and knowing where to start debugging is non-obvious. On the flip side, redirecting from POST and others is the default, done everywhere, so it's less likely to be removed or otherwise missed. Alternatives are to do more explicit browser sniffing. Ref #23827.
* | | | | | | | | Merge pull request #24259 from jeremy/cable/disconnected-client-errorsJeremy Daer2016-03-235-1/+136
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Cable: Gracefully handle disconnected clients
| * | | | | | | | | Gracefully handle disconnected clientsJeremy Daer2016-03-205-1/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll get `Errno::ECONNRESET` if the client forcibly disconnected. Just close the socket rather than raising the exception. Handle other errors in `ClientSocket#write`, too, mirroring the Faye error handling which swallows all `StandardError` on write.
* | | | | | | | | | Merge pull request #24167 from ↵Jeremy Daer2016-03-233-28/+44
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/append_sql_mode_instead_of_overwriting_in_strict_mode Append sql_mode instead of overwriting in strict mode
| * | | | | | | | | | Append sql_mode instead of overwriting in strict modeRyuta Kamizono2016-03-132-28/+37
| | |_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | For keep the default SQL mode.
* | | | | | | | | | Merge pull request #24284 from olivierlacan/patch-1Rafael França2016-03-231-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Remove reference to unmaintained plugin/gem in Security guide
| * | | | | | | | | | Remove reference to unmaintained plugin/gemOlivier Lacan2016-03-231-1/+1
| | |_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [restful-authentication](https://rubygems.org/gems/restful-authentication/versions/1.2.1) hasn't been updated since September 6th, 2012 so it might not be a great idea to recommend that Rails users try it out. Devise seems like a much more popular and secure solution that automatically resets sessions on sign in and out so it's a great example in this case. /cc @tenderlove @josevalim
* | | | | | | | | | Merge pull request #24196 from koenpunt/plugin-action-cableKasper Timm Hansen2016-03-231-2/+4
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Bugfix: ActionCable not loaded when generating plugin without ActiveRecord
| * | | | | | | | | Add ActionCable require statement to pluginKoen Punt2016-03-231-2/+4
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating a plugin without ActiveRecord (-O), ActionCable wasn't include, which causes problems with the require action_cable statement in cable.js add active_job require statement also updated order of require statements to match with all.rb
* | | | | | | | | [ci skip] Improve comment minitest plugin initialization.Kasper Timm Hansen2016-03-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Didn't feel we were clear enough about our motivation for placing Rails first and why we needed to call `load_plugins`.
* | | | | | | | | Don't get ahead of ourselves.Kasper Timm Hansen2016-03-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The useless explicit self calls were driving me nuts.
* | | | | | | | | Set Rails as the first minitest initialized plugin.Kasper Timm Hansen2016-03-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling `load_plugins` minitest would fill out its extensions, then we'd tackle ourselves on as the last plugin. Because minitest loads plugins in order we will ultimately have the last say on what reporters will be used. Invert that strategy by putting ourselves first and give other plugins plenty of leeway to override our default reporter setup. Fixes #24179.
* | | | | | | | | Merge pull request #24278 from keram/rails_code_conventionRafael França2016-03-222-2/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Use || instead of `or` in bin/(update|setup) tpl as preferred by rails code convention
| * | | | | | | | | Use || instead of `or` as preferred in rails code conventionMarek L2016-03-222-2/+2
| | | | | | | | | |
* | | | | | | | | | Merge pull request #24276 from artfuldodger/patch-2Kasper Timm Hansen2016-03-221-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix WebSocket already open log message typo
| * | | | | | | | | | Fix WebSocket already open log message typoJon Evans2016-03-221-1/+1
| |/ / / / / / / / /
* | | | | | | | | | Merge pull request #24275 from arekf/masterKasper Timm Hansen2016-03-221-1/+1
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Fix typo for redirect_back (docs)
| * | | | | | | | | Fix typo for redirect_backArkadiusz Fal2016-03-221-1/+1
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | indetical -> identical [skip ci]
* | | | | | | | | Merge pull request #24271 from vipulnsward/grammar-fix-changelogYves Senn2016-03-221-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fixed abrupt start of sentence in changelog [ci skip]
| * | | | | | | | | - Fixed abrupt start of sentence in changelogVipul A M2016-03-221-1/+1
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | guides, sync 5.0 release notes with changelogsYves Senn2016-03-224-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Sync AV, AR, AJ, AS, AM changelogs with our 5.0 release notes draft. This is a follow up to c94045d and contains changes made since the release of beta1.
* | | | | | | | | guides, sync railties and AP changelogs with 5.0 release notes.Yves Senn2016-03-223-13/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] This updates the 5.0 release notes guide to reflect changes that happened after beta1 has been released. I'll sync the other changelogs later today but I'll push this batch to prevent against cumbersome merge conflicts.
* | | | | | | | | Merge pull request #24269 from bquorning/require-enumerableAkira Matsuda2016-03-221-0/+1
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / |/| | | | | | | | Require enumerable module when using #sum