Yves Senn
3ffffcc39d
prefer drop_table :table, if_exists: true
over explicit checks.
2015-02-11 11:21:00 +01:00
Yves Senn
174f5ed545
add test to ensure remove_reference
with index and fk is invertable.
2015-02-11 11:20:59 +01:00
Yves Senn
a893718c31
fix remove_reference
with foreign_key: true
on MySQL. #18664 .
...
MySQL rejects to remove an index which is used in a foreign key constraint:
```
ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_copies_on_title_id': needed in a foreign key constraint: ALTER TABLE `copies` DROP `title_id`
```
Removing the constraint before removing the column (and the index) solves this problem.
2015-02-11 11:20:59 +01:00
Yves Senn
9bdb083dba
Merge pull request #18890 from kamipo/remove_cast_type
...
Remove `cast_type` in `ColumnDefinition`
2015-02-11 09:47:50 +01:00
Yves Senn
714e6fc445
guides, various testing guide changes. [ci skip]
...
/cc @zzak
2015-02-11 09:27:14 +01:00
Yves Senn
4a9301b3f2
Merge pull request #18363 from andreynering/add-foreign-key-subsection-in-upgrading-guide
...
Adding subsection on 'Upgrading' guide about foreign key support
[ci skip]
2015-02-11 08:41:06 +01:00
Zachary Scott
4901d03348
Merge pull request #18892 from robertzk/typo_in_rails_engine_rb
...
Fix some typos in railties/lib/rails/engine.rb [ci-skip]
2015-02-10 20:36:26 -08:00
RobertZK
a7235192be
Fix some typos in railties/lib/rails/engine.rb [ci-skip]
2015-02-10 22:29:28 -06:00
Arthur Nogueira Neves
32cd45e7b2
Merge pull request #18891 from robertzk/typo_in_rails_application_rb
...
Fix typo in Rails::Application#migration_railties documentation [ci-skip]
2015-02-10 23:02:35 -05:00
RobertZK
d3ebc8021b
Fix typo in Rails::Application#migration_railties
2015-02-10 21:15:23 -06:00
Rafael Mendonça França
e5e0b47c67
Merge pull request #18889 from kamipo/use_kwargs_in_transaction
...
Use keyword argument in `transaction`
2015-02-11 00:25:21 -02:00
Ryuta Kamizono
4748d5a1ef
Remove cast_type
in ColumnDefinition
...
This is no longer needed.
2015-02-11 11:13:52 +09:00
Ryuta Kamizono
be9addb69b
Use keyword argument in transaction
...
The keys are already validated, so it is better to use the built-in
feature to do this.
2015-02-11 11:03:18 +09:00
Rafael Mendonça França
17d9996c91
Merge pull request #18884 from rails/fix-kwarg-on-stale
...
Fix wrong kwarg "record" from #18872
2015-02-10 23:05:53 -02:00
claudiob
c7331e057b
Fix wrong kwarg "record" from #18872
...
PR #18772 changed the parameters of `stale?` to use `kwargs`.
[As for this comment](https://github.com/rails/rails/pull/18872/files#r24456288 )
the default value for the `etag` parameter should be `record`, not `nil`.
This commit fixes the code and introduces a test that:
- passed before #18872
- fails on the current master (after #18772 )
- passes again after setting the default value of `etag` to `record`.
2015-02-10 17:02:24 -08:00
Andrey Nering
e1db9d6418
Adding subsection on 'upgrading' guide about 4.2 foreign key support [ci skip]
2015-02-10 20:45:17 -02:00
Arthur Nogueira Neves
162581a448
Merge pull request #18872 from kaspth/kw-fresh_when-stale
...
Convert stale? and fresh_when to use keyword arguments.
2015-02-10 17:26:30 -05:00
Kasper Timm Hansen
7a78c25123
Convert stale? and fresh_when to use keyword arguments.
2015-02-10 23:01:47 +01:00
Arthur Neves
2c5c0690cc
Dont check bundler output on plugin generator test
2015-02-10 16:22:53 -05:00
Sean Griffin
7210a0371f
Actually fix the build
...
Like for real this time. I checked.
2015-02-10 12:36:18 -07:00
Rafael Mendonça França
3d91083e14
Merge pull request #18877 from prathamesh-sonpatki/ar-changelog-typos-2
...
Fixed typos in ActiveRecord CHANGELOG [ci skip]
2015-02-10 17:23:13 -02:00
Rafael Mendonça França
5d180fdf06
Merge pull request #12257 from vipulnsward/end_on_find_in_batches
...
Add an option `end` to `find_in_batches`
2015-02-10 17:16:48 -02:00
Prathamesh Sonpatki
cb7190aa9c
Fixed typos in ActiveRecord CHANGELOG [ci skip]
2015-02-11 00:43:51 +05:30
Sean Griffin
84c20e27b6
Fix the build
2015-02-10 12:12:14 -07:00
Sean Griffin
f1a0fa9e19
Refactor microsecond precision to be database agnostic
...
The various databases don't actually need significantly different
handling for this behavior, and they can achieve it without knowing
about the type of the object.
The old implementation was returning a string, which will cause problems
such as breaking TZ aware attributes, and making it impossible for the
adapters to supply their logic for time objects.
2015-02-10 11:55:59 -07:00
Rafael Mendonça França
f926c1c953
Merge pull request #18860 from alex-handley/enhancement/dependent_documentation_fix
...
Documentation Fix: Corrects explanation of what happens when dependent is not set
2015-02-10 15:15:30 -02:00
Sean Griffin
2f8c596d1b
Maintain a consistent order in ActiveRecord::Base#attributes
...
Fixes #18871
2015-02-10 08:21:46 -07:00
Robin Dupret
d89912b9be
Merge pull request #18808 from carlosramireziii/i18n-doc-update
...
Document lazy lookup behavior for controllers [ci skip]
2015-02-10 15:59:45 +01:00
Sean Griffin
a2c80a8945
Change LockingType
to use DelegateClass
...
Significantly faster than `SimpleDelegator`.
2015-02-09 10:28:54 -07:00
Rafael Mendonça França
20649697ce
Merge pull request #18841 from yuki24/remove-warning-from-av-tags-translator
...
Remove warning from ActionView::Helpers::Tags::Translator
2015-02-09 13:38:19 -02:00
Sean Griffin
bae903440d
Merge pull request #18849 from kamipo/array_type_is_a_part_of_sql_type
...
An array type is a part of `sql_type`
2015-02-09 08:29:10 -07:00
Alex Handley
577a7c6dd1
[ci skip] corrects documentation for the default dependent behaviour
...
By default the foreign key will remain set with the parent id after
destroy is fired.
2015-02-09 14:15:39 +00:00
Yves Senn
8ba7548877
tests, reset global to previous value.
...
The default of the global might change. It's better to reset it to
what it was than a hardcoded value.
2015-02-09 10:41:37 +01:00
Yves Senn
c6a36ef9af
Merge pull request #18839 from yuki24/remove-warning-from-generators-named-base-test
...
Remove warning from generator named base test
2015-02-09 10:39:30 +01:00
Yves Senn
300631e08f
Merge pull request #18840 from yuki24/remove-warning-from-plugin-generator
...
Remove warning from Plugin Generator
2015-02-09 10:33:49 +01:00
Yuki Nishijima
f5c27446bf
Remove warning from generator named base test
...
This removes the following warning:
railties/test/generators/named_base_test.rb:9: warning: method redefined; discarding old pluralize_table_names
activesupport/lib/active_support/core_ext/class/attribute.rb:86: warning: previous definition of pluralize_table_names was here
railties/test/generators/named_base_test.rb:9: warning: method redefined; discarding old pluralize_table_names=
activesupport/lib/active_support/core_ext/class/attribute.rb:83: warning: previous definition of pluralize_table_names= was here
2015-02-08 17:09:12 -08:00
Yuki Nishijima
6b76c2e280
Remove warning from ActionView::Helpers::Tags::Translator
...
This removes the following warning:
/GitHub/rails/actionview/lib/action_view/helpers/tags/translator.rb:19: warning: private attribute?
2015-02-08 16:00:19 -08:00
Andrew White
b6dd0c4dde
Merge pull request #18764 from tsun1215/master
...
Explicitly ignored wildcard verbs from head_routes
2015-02-08 23:50:16 +00:00
Yuki Nishijima
39af02aa3c
Remove warning from Plugin Generator
...
This removes the following warning:
rails/railties/lib/rails/generators/rails/plugin/plugin_generator.rb:321: warning: shadowing outer local variable - content
2015-02-08 15:45:38 -08:00
Vipul A M
3dc432068b
Add an option end_at
to find_in_batches
...
that complements the `start`parameter to specify where to stop batch processing
2015-02-09 01:33:57 +05:30
Terence Sun
b9c63b0aae
Explicitly ignored wildcard verbs from head_routes
...
In match_head_routes, deleted the routes in which request.request_method was empty (matches all HTTP verbs) when responding to a HEAD request. This prevents catch-all routes (such as Racks) from intercepting the HEAD request.
Fixes #18698
2015-02-08 12:03:56 -05:00
Carlos Antonio da Silva
de9a3748c4
Move #18833 changelog to the top [ci skip]
2015-02-08 11:52:47 -02:00
Carlos Antonio da Silva
f636ab75f1
Remove debug code
...
Added by 101c19f55f5f1d86d35574b805278f11e9a1a48e.
2015-02-08 11:51:22 -02:00
Andrew White
00222bc22a
Merge pull request #18850 from kamipo/fix_rounding_problem_for_postgresql_timestamp_column
...
Fix rounding problem for PostgreSQL timestamp column
2015-02-08 13:41:22 +00:00
Ryuta Kamizono
f983912037
Fix rounding problem for PostgreSQL timestamp column
...
If timestamp column have the precision, it need to format according to
the precision of timestamp column.
2015-02-08 22:22:55 +09:00
Andrew White
31fafe0a32
Merge pull request #18602 from kamipo/respect_database_charset_and_collation
...
Respect the database default charset for `schema_migrations` table.
2015-02-08 13:12:01 +00:00
Andrew White
b1e6794238
Merge pull request #18848 from kamipo/add_auto_increment_method
...
Add `auto_increment?` instead of `extra == 'auto_increment'`
2015-02-08 13:07:53 +00:00
Andrew White
b7e592bd3b
Merge pull request #18851 from kamipo/remove_unused_line
...
Remove unused line
2015-02-08 12:55:27 +00:00
Abdelkader Boudih
d7dad950eb
Merge pull request #18852 from kamipo/missing_at
...
Missing `@` [ci skip]
2015-02-08 12:33:28 +00:00
Ryuta Kamizono
2abde96002
Missing @
[ci skip]
2015-02-08 20:23:46 +09:00