Commit Graph

64737 Commits

Author SHA1 Message Date
Yoshiyuki Hirano 5d8945fd49 Fix email in Active Support Instrumentation [ci skip]
* `s/ddh/dhh/`
2017-09-24 11:25:15 +09:00
Sean Griffin 8b139444dd Merge pull request #30688 from y-yagi/make_bang_verion_work_with_inheritable_options
Make bang version work with `InheritableOptions`
2017-09-23 05:51:36 -06:00
yuuji.yaginuma 962ce60ff1 Make bang version work with `InheritableOptions`
Currently, bang version does not work with `InheritableOptions`.
`InheritableOptions` treats the argument Hash as the default value.
However, `Hash#fetch` does not use the default value when key is not
found, so can not get the default value.
So in bang version, should use `Hash#[]` instead of `Hash#fetch`.
2017-09-23 18:25:16 +09:00
Ryuta Kamizono 202d6578f4 Move integer-like primary key normalization to `new_column_definition`
Currently the normalization only exists in `primary_key` shorthand. It
should be moved to `new_column_definition` to also affect to
`add_column` with primary key.
2017-09-23 15:48:49 +09:00
Ryuta Kamizono dfe6939e16 Adding legacy primary key should be compatible
Currently implicit legacy primary key is compatible, but adding explicit
legacy primary key is not compatible. It should also be fixed.

Fixes #30664.
2017-09-23 13:55:47 +09:00
Sean Griffin c371eeffb3 Merge pull request #30686 from metaskills/sqlserver-1as1fix
Ensure `1 AS one` for SQL Server with Calculations
2017-09-22 19:47:48 -06:00
Ken Collins cfc461c3f8 Ensure `1 AS one` for SQL Server with calculations. 2017-09-22 21:33:14 -04:00
Ryuta Kamizono b798c5b796 Prevent extra `column_for` for `change_column_{default,null,comment}`
`change_column_{default,null,comment}` in mysql2 adapter are passing
`column.sql_type` as `type` to `change_column` to intend keeping
previous type. But `column_for` requires extra query, so use passing
`nil` to `type` explicitly in the internal for the purpose.
2017-09-23 05:55:48 +09:00
Ryuta Kamizono 18346bd52a `index_name` should be quoted 2017-09-22 23:09:53 +09:00
Ryuta Kamizono 6fd81d2d8e Return nil if table comment is blank 2017-09-22 23:04:54 +09:00
Ryuta Kamizono a0277a974c Merge pull request #30677 from alecspopa/master
Implement change_table_comment and change_column_comment
2017-09-22 17:44:08 +09:00
Alecs Popa 72a22fa929 Implement change_table_comment and change_column_comment for MySql Adapter 2017-09-22 10:32:26 +03:00
Ryuta Kamizono 7f3aab91b8 Merge pull request #30683 from y-yagi/fix_30644
Use `TOPLEVEL_BINDING` in rails runner command
2017-09-22 12:31:24 +09:00
yuuji.yaginuma daa592293b Use `TOPLEVEL_BINDING` in rails runner command
Binding to capture the local scope. This means that if a constant with same
name as constant specified by the user exists in local scope, constant
defined in local will use. This is different from what the user expects.
Therefore, fixed to use top-level binding instead of local scope.

Fixes #30644
2017-09-22 10:42:28 +09:00
Ryuta Kamizono 30ae39efc2 Merge pull request #24199 from meinac/fix_invert_add_index
Use algorithm while removing index with db:rollback
2017-09-21 19:20:23 +09:00
Ryuta Kamizono e0f4ccabb8 Merge pull request #30671 from y-yagi/fix_interpreted_as_argument_prefix
Fix "warning: `*' interpreted as argument prefix"
2017-09-21 19:14:55 +09:00
Mehmet Emin İNAÇ 611f2b2911
Use algorithm while removing index with db:rollback
Closes #24190
2017-09-21 11:06:21 +02:00
yuuji.yaginuma 4883a82251 Fix "warning: `*' interpreted as argument prefix"
This fixes following warning:

```
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:11: warning: `*' interpreted as argument prefix
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:23: warning: `*' interpreted as argument prefix
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:35: warning: `*' interpreted as argument prefix
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:48: warning: `*' interpreted as argument prefix
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:61: warning: `*' interpreted as argument prefix
```
2017-09-21 13:33:43 +09:00
Ryuta Kamizono 6c199967fc Merge pull request #30669 from yhirano55/update_link_in_asset_pipeline_guide
Update link in The Asset Pipeline guide [ci skip]
2017-09-21 10:51:02 +09:00
Yoshiyuki Hirano 9b917789fa Update link in The Asset Pipeline guide [ci skip] 2017-09-21 08:08:04 +09:00
Eileen M. Uchitelle 55e50f7c78 Merge pull request #30619 from jagthedrummer/jeremy/instrumentation-payload-names
Update payload names for `sql.active_record` instrumentation to be more descriptive.
2017-09-20 18:38:57 -04:00
Eileen M. Uchitelle aa0c8778dc Merge pull request #30548 from chumakoff/update_autosave_guides
Update Rails Guides about  :autosave option
2017-09-20 17:54:12 -04:00
Jeremy Green fda9df7b4e Update payload names for `sql.active_record` to be more descriptive.
Fixes #30586.
2017-09-20 16:46:14 -05:00
Anton Chumakov 8c2ca4d4fc Update Rails Guides about :autosave option 2017-09-20 22:37:19 +03:00
George Claghorn 4e68525e33 Add missing word [ci skip] 2017-09-20 15:35:01 -04:00
George Claghorn 91edf754c4 Flesh out ActiveStorage::Filename docs 2017-09-20 15:34:04 -04:00
Sean Griffin eddb9baf39 Merge pull request #30624 from bogdanvlviv/deprecate_Module_reachable
Deprecate `Module#reachable?` method
2017-09-20 13:11:34 -06:00
Eileen M. Uchitelle e7f39af3fa Merge pull request #30629 from yhirano55/add_scope_to_has_one_attached_macro
Add `with_attached_*` scope to `has_one_attached` macro
2017-09-20 13:04:00 -04:00
Eileen M. Uchitelle 057de4f7c9 Merge pull request #30616 from yhirano55/update_layouts_and_rendering
Update Layouts and Rendering in Rails [ci skip]
2017-09-20 13:01:31 -04:00
Javan Makhmali 30767f980f Merge pull request #30623 from manojmj92/manojmj92-oo-key-patch
make documentation consistent with  KeyError message
2017-09-20 07:29:12 -04:00
Manoj M J 80f46653e2 Fix error message documentation 2017-09-20 13:08:00 +05:30
Ryuta Kamizono 1e40df6ffb Merge pull request #30657 from yhirano55/fix_restful_wording
Use RESTful instead of restful
2017-09-20 15:29:57 +09:00
Ryuta Kamizono 918115148d Merge pull request #30655 from kuzukuzu/fix_create_join_table_compatibility
make create_join_table compatible.
2017-09-20 12:37:06 +09:00
Yuki Masutomi 0c8bed9f84 make create_join_table compatible. 2017-09-20 10:27:25 +09:00
Ryuta Kamizono ee033fd113 Merge pull request #30659 from y-yagi/follow_up_of_30650
Use credentials in `storage.yml` template
2017-09-20 10:04:51 +09:00
yuuji.yaginuma 96fe56357a Use credentials in `storage.yml` template
Follow up of #30650
2017-09-20 08:10:56 +09:00
Claudio B 2f8ecdb21d Use credentials, not secrets, for Active Storage (#30650)
According to #30067:

> This PR will deprecate secrets.yml* and instead adopt
> config/credentials.yml.enc to signify what these secrets are specifically
> for: Keeping API keys, database passwords, and any other integration
> credentials in one place.

[ci skip] since only comments are being edited.
2017-09-19 17:08:32 -05:00
Ryuta Kamizono e0484a3730 Merge pull request #30656 from yskkin/add_column_doc
Add :comment option for add_column [ci skip]
2017-09-20 06:45:25 +09:00
Yoshiyuki Hirano 7ee6cd9dfc Use RESTful instead of restful 2017-09-20 00:37:52 +09:00
Yoshiyuki Kinjo 7bab6b8cd9 Add :comment option for add_column [ci skip] 2017-09-20 00:09:17 +09:00
Javan Makhmali 18cfbeca85 Merge pull request #30648 from ydakuka/patch-1
Update action_controller_overview.md [ci skip]
2017-09-19 08:26:04 -04:00
Ryuta Kamizono b2333bc716 Merge pull request #30653 from y-yagi/remove_unsued_digits_and_rounded_number
Remove unused `NumberToRoundedConverter#digits_and_rounded_number`
2017-09-19 19:16:14 +09:00
yuuji.yaginuma 5533696015 Remove unused `NumberToRoundedConverter#digits_and_rounded_number`
`digits_and_rounded_number` is unused since #26628
2017-09-19 18:27:33 +09:00
Yauheni Dakuka fe15175039 Update action_controller_overview.md [ci skip] 2017-09-19 11:42:19 +03:00
Yoshiyuki Hirano 704bf9b9c6 Add `with_attached_*` scope to `has_one_attached` macro
* For avoiding N+1 problem, added `with_attached_*` scope to
  `has_one_attached` macro.
2017-09-19 06:02:00 +09:00
Eileen M. Uchitelle 42d09f6b49 Merge pull request #30638 from twalpole/capybara_server
Use the default Capybara registered puma server configuration
2017-09-18 16:46:26 -04:00
Thomas Walpole ba04b580c6 Use the default Capybara registered puma server configuration 2017-09-18 08:48:52 -07:00
Ryuta Kamizono e4017d0288 Merge pull request #30645 from yhirano55/use_application_job_instead_of_active_job_base
Use ApplicationJob instead of ActiveJob::Base in guide [ci skip]
2017-09-18 22:25:40 +09:00
Yoshiyuki Hirano 9291a81369 Use ApplicationJob instead of ActiveJob::Base in guide [ci skip] 2017-09-18 22:15:46 +09:00
Ryuta Kamizono 3d7d1e2165 Merge pull request #30643 from gerardc/gerardc/guides-add-active-job-retrying-discarding-section
Add section to guides for discarding and retrying active jobs [ci skip]
2017-09-18 22:08:17 +09:00