aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | Merge pull request #35690 from soartec-lab/update_guide_sending_log_messagesRyuta Kamizono2019-03-241-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add `unknown` method to list of methods to write current log [ci skip]
| * | | | | | | | | Add `unknown` method to list of methods to write current log [ci skip]soartec-lab2019-03-211-1/+1
| | | | | | | | | |
* | | | | | | | | | Merge pull request #35724 from ↵Ryuta Kamizono2019-03-241-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soartec-lab/update_guide_raise_on_missing_translations_default Add default `config.action_view.raise_on_missing_translations` [ci skip]
| * | | | | | | | | | Add default `config.action_view.raise_on_missing_translations` [ci skip]soartec-lab2019-03-241-1/+1
| | |_|_|_|_|_|_|/ / | |/| | | | | | | |
* | | | | | | | | | Merge pull request #35718 from ↵Yuji Yaginuma2019-03-242-2/+24
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/add_secret_key_base_when_creating_new_credentials Add `secret_key_base` when creating new credential file
| * | | | | | | | | Add `secret_key_base` when creating new credential fileyuuji.yaginuma2019-03-232-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `secret_key_base` is expected to be included in credential file, `secret_key_base` should be included even if re-create the file. This is the same behavior as creating a new app. When env is specified, it may be unnecessary, so I added it only when not specifying env.
* | | | | | | | | | Avoid creating ActionText::RichText records unnecessarilyGeorge Claghorn2019-03-232-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assigning a has_one association for a persisted record saves the change immediately, so attempting to read a rich-text attribute on a persisted record without a corresponding ActionText::RichText would eagerly create one. Avoid assigning the rich text association to fix.
* | | | | | | | | | Depend on Zeitwerk 1.4.2Xavier Noria2019-03-232-3/+3
| | | | | | | | | |
* | | | | | | | | | Merge pull request #35683 from Kukunin/masterRyuta Kamizono2019-03-232-7/+38
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Bugfix: Fix false autosave for has_one :through association
| * | | | | | | | | | Fix unintended autosave on has_one through associationSergiy Kukunin2019-03-222-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #35680 The problem occurred, when a `has one through` association contains a foreign key (it belongs to the intermediate association). For example, Comment belongs to Post, Post belongs to Author, and Author `has_one :first_comment, through: :first_post`. In this case, the value of the foreign key is comparing with the original record, and since they are likely different, the association is marked as changed. So it updates every time when the origin record updates.
* | | | | | | | | | | Merge pull request #35719 from shailesh-kalamkar/fix-change-log-typoRichard Schneeman2019-03-221-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Fixed CHANGELOG typo
| * | | | | | | | | | | [ci skip] Fixed typoShailesh Kalamkar2019-03-231-1/+1
|/ / / / / / / / / / /
* | / / / / / / / / / Update comment for how secret key is calculatedJohn Hawthorn2019-03-221-1/+2
| |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the comment to reflect how the secret key is generated since 4c743587ad6a31908503ab317e37d70361d49e66 Fixes #35717
* | | | | | | | | | Merge pull request #35713 from gmcgibbon/drop_nsec_in_job_argument_assertionsGannon McGibbon2019-03-223-0/+73
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Drop microseconds in job argument assertions
| * | | | | | | | | | Drop microseconds in job argument assertionsGannon McGibbon2019-03-223-0/+73
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #35715 from jhawthorn/changelog_for_cves_6_0John Hawthorn2019-03-222-2/+21
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Update CHANGELOGs for 6.0.0.beta3 release
| * | | | | | | | | | | Update CHANGELOGs for 6.0.0.beta3 releaseJohn Hawthorn2019-03-222-2/+21
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #35710 from alimi/as-changelog-typoJohn Hawthorn2019-03-221-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / |/| | | | | | | | | | | Fix AS CHANGELOG typo
| * | | | | | | | | | | Fix AS CHANGELOG typoAli Ibrahim2019-03-221-1/+1
|/ / / / / / / / / / /
* | | | | | | | | | | Merge pull request #35707 from ↵Rafael França2019-03-221-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | localhostdotdev/fix-rails-guides-generation-invalid-formats-html Fix rails guides generation
| * | | | | | | | | | | Fix rails guides generationlocalhostdotdev2019-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was getting `formats=': Invalid formats: "html"
* | | | | | | | | | | | Merge pull request #35705 from alimi/instrumenter-block-optionalEileen M. Uchitelle2019-03-224-4/+29
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / |/| | | | | | | | | | | Update AS::Notifications::Instrumenter#instrument
| * | | | | | | | | | | Update instrumentation guides w/optional blockAli Ibrahim2019-03-221-0/+11
| | | | | | | | | | | |
| * | | | | | | | | | | Update CHANGELOG and docsAli Ibrahim2019-03-222-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with change to ActiveSupport::Notifications::Instrumenter#instrument
| * | | | | | | | | | | Update AS::Notifications::Instrumenter#instrumentAli Ibrahim2019-03-222-1/+7
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update #instrument to make passing a block optional. This will let users leverage #instrument for messaging in addition to instrumentation.
* | | | | | | | | | | Merge pull request #35617 from mattyoho/add-annotation-support-to-relationsEileen M. Uchitelle2019-03-2238-19/+645
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / / |/| | | | | | | | | | Add support for annotating queries generated by ActiveRecord::Relation with SQL comments
| * | | | | | | | | | Add Relation#annotate for SQL commentingMatt Yoho2019-03-2138-19/+645
| | |_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has two main portions: 1. Add SQL comment support to Arel via Arel::Nodes::Comment. 2. Implement a Relation#annotate method on top of that. == Adding SQL comment support Adds a new Arel::Nodes::Comment node that represents an optional SQL comment and teachers the relevant visitors how to handle it. Comment nodes may be added to the basic CRUD statement nodes and set through any of the four (Select|Insert|Update|Delete)Manager objects. For example: manager = Arel::UpdateManager.new manager.table table manager.comment("annotation") manager.to_sql # UPDATE "users" /* annotation */ This new node type will be used by ActiveRecord::Relation to enable query annotation via SQL comments. == Implementing the Relation#annotate method Implements `ActiveRecord::Relation#annotate`, which accepts a comment string that will be appeneded to any queries generated by the relation. Some examples: relation = Post.where(id: 123).annotate("metadata string") relation.first # SELECT "posts".* FROM "posts" WHERE "posts"."id" = 123 # LIMIT 1 /* metadata string */ class Tag < ActiveRecord::Base scope :foo_annotated, -> { annotate("foo") } end Tag.foo_annotated.annotate("bar").first # SELECT "tags".* FROM "tags" LIMIT 1 /* foo */ /* bar */ Also wires up the plumbing so this works with `#update_all` and `#delete_all` as well. This feature is useful for instrumentation and general analysis of queries generated at runtime.
* | | | | | | | | | Merge pull request #35695 from jhawthorn/render_templateRafael França2019-03-227-42/+43
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Prefer render template: over render file: in tests
| * | | | | | | | | | Prefer render template: in testsJohn Hawthorn2019-03-217-42/+43
| | |_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many tests were using `render file:`, but were only testing the behaviour of `render template:` (file: just allows more paths/ is less secure then template:). The reason for so many `render file:` is probably that they were the old default. This commit replaces `render file:` with `render template:` anywhere the test wasn't specifically interested in using `render file:`.
* | | | | | | | | | Fix announce scriptRafael Mendonça França2019-03-221-2/+5
| | | | | | | | | |
* | | | | | | | | | Fix release templateRafael Mendonça França2019-03-211-2/+2
| |/ / / / / / / / |/| | | | | | | |
* | | | | | | | | Fix server restart test on Puma 3.12.1yuuji.yaginuma2019-03-222-4/+4
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since https://github.com/puma/puma/pull/1700, the default host is correctly used. So `localhost` is used instead of `0.0.0.0`. As a result, the log output on restart is changed, and the restart test fails on Puma 3.12.1. https://travis-ci.org/rails/rails/jobs/509239592#L2303-L2305 Specify binding explicitly to avoid being affected by Puma changes.
* | | | | | | | Fix document formatting of Database configuration classes [ci skip]yuuji.yaginuma2019-03-213-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Show options as list. * Fix incorrect quoting.
* | | | | | | | Address rubocop offencesRyuta Kamizono2019-03-212-9/+9
| | | | | | | |
* | | | | | | | Merge pull request #35685 from XrXr/attribute-forwardingGannon McGibbon2019-03-202-0/+24
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | Document option forwarding in ActiveRecord::Base.attribute
| * | | | | | | Document option forwarding in ActiveRecord::Base.attributeAlan Wu2019-03-202-0/+24
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been supported for a while but we didn't have documentation for it.
* | | | | | | Merge pull request #35546 from rails/bulk-inserts-with-indexKasper Timm Hansen2019-03-203-139/+165
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Bulk Insert: Reuse indexes for unique_by
| * | | | | | | [ci skip] Documentation pass for insert_all etc.Kasper Timm Hansen2019-03-201-105/+107
| | | | | | | |
| * | | | | | | Bulk Insert: Reuse indexes for unique_byKasper Timm Hansen2019-03-203-64/+88
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found `:unique_by` with `:columns` and `:where` inside it tough to grasp. The documentation only mentioned indexes and partial indexes. So why duplicate a model's indexes in an insert_all/upsert_all call when we can just look it up? This has the added benefit of raising if no index is found, such that people can't insert thousands of records without relying on an index of some form.
* | | | | | | Merge pull request #35661 from jhawthorn/lookup_context_validationEileen M. Uchitelle2019-03-204-3/+19
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Validate types assigned to LookupContext#formats=
| * | | | | | Don't compact formatsJohn Hawthorn2019-03-192-6/+1
| | | | | | |
| * | | | | | Avoid assigning [nil] to formatsJohn Hawthorn2019-03-191-1/+1
| | | | | | |
| * | | | | | Improve "raises on invalid format assignment" testJohn Hawthorn2019-03-181-2/+2
| | | | | | |
| * | | | | | Rename invalid_types to invalid_valuesJohn Hawthorn2019-03-181-3/+3
| | | | | | |
| * | | | | | Use symbol for mail preview format, not stringJohn Hawthorn2019-03-181-1/+1
| | | | | | |
| * | | | | | Raise in LookupContext#formats= on invalid formatJohn Hawthorn2019-03-182-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a developer quality of life improvement, to ensure that unknown formats aren't assigned (which it would previously accept, but wouldn't work 100% correctly due to caching).
| * | | | | | Make uniq in LookupContext#formats=John Hawthorn2019-03-182-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a format listed twice had no effect. This is mostly helpful to avoid an extra format when assigning [:html, "*/*"]
| * | | | | | Ignore nil in LookupContext#formats=John Hawthorn2019-03-182-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also removes the mutation we were performing on the values being passed in.
* | | | | | | Merge pull request #35677 from ↵Kasper Timm Hansen2019-03-201-1/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bogdanvlviv/mention-process_middleware.action_dispatch-in-the-guide Add mention about `process_middleware.action_dispatch` in the guide [ci skip]
| * | | | | | | Add mention about `process_middleware.action_dispatch` in the guide [ci skip]bogdanvlviv2019-03-201-1/+10
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | We added ActiveSupport::Notifications instrumentation of the processing of each middleware in the stack, See 04ae0b0b5e594e0bb99c5cd608921745977bcdcd.