Commit Graph

48289 Commits

Author SHA1 Message Date
Rafael Mendonça França
ec0a71066a Merge pull request #18007 from georgemillo/patch-1
English fix [ci skip]
2014-12-12 11:45:08 -02:00
George Millo
cca240ab35 English fix [ci skip] 2014-12-12 13:36:55 +00:00
Zachary Scott
b5001ea4d8 Merge pull request #17815 from yuki24/remove-custom-errors-page-section
Remove custom errors page section from the guides [ci skip]
2014-12-11 18:30:35 -05:00
Sean Griffin
6cb956592c Add test case for joined pluck
39542fba54 (commitcomment-8938379)
2014-12-11 14:54:03 -07:00
Sean Griffin
39542fba54 Improve the test case introduced by bd0d47e 2014-12-11 13:34:46 -07:00
Sean Griffin
387065a023 Merge pull request #17994 from mfazekas/pluck-bind-values-master
Fix ProtocolViolation/bind message for polymorphic + pluck or group+calc
2014-12-11 13:25:22 -07:00
Rafael Mendonça França
aec7ee479c Merge pull request #18000 from caike/master
Update guides with info about vendor/assets [ci skip]
2014-12-11 17:57:08 -02:00
Carlos Souza
5a6e3b308f Update guides with info about vendor/assets
fixes #17893

[ci skip]
2014-12-11 14:04:51 -05:00
Sean Griffin
c0c6dd6aa2 Merge pull request #17793 from kamipo/fix_undesirable_range_error
Fix undesirable RangeError by Type::Integer. Add Type::UnsignedInteger.
2014-12-11 11:04:37 -07:00
Sean Griffin
407540e6df Merge pull request #17998 from kamipo/refactor_quoted_date
Refactor `quoted_date`
2014-12-11 11:04:10 -07:00
Ryuta Kamizono
b61a93b44e Fix undesirable RangeError by Type::Integer. Add Type::UnsignedInteger. 2014-12-12 00:35:48 +09:00
Rafael Mendonça França
6961afefd2 Revert "Merge pull request #17943 from jeremywadsack/doc_cache_importability"
This reverts commit b0e7278ddbe483475d7b2e161e65ae18df91b9f8, reversing
changes made to 785d04e3109f69d0b9b9f4732179592f0ef04e52.

This is not true. It is a bug and we will fix in the latest 4.0.x
release.
2014-12-11 12:19:23 -02:00
Ryuta Kamizono
cb07e63ba8 Refactor quoted_date
Move microseconds formatting to `AbstractAdapter`.
2014-12-11 19:45:01 +09:00
Miklos Fazkeas
bd0d47eed6 Fix ProtocolViolation/bind message supplies for polymorphic + pluck or group 2014-12-11 00:48:06 +01:00
Rafael Mendonça França
81e940c313 Merge pull request #17970 from ulissesalmeida/foreign-type-has-many-has-one
Add foreign_type option for polymorphic has_one and has_many.
2014-12-10 19:15:07 -02:00
Zachary Scott
efe80bce97 Merge pull request #17989 from y-yagi/patch-1
[ci skip] fix typo in MessageVerifier#verify docs
2014-12-09 15:41:03 -08:00
yuuji.yaginuma
628580c032 [ci skip] fix typo in MessageVerifier#verify docs 2014-12-10 08:23:15 +09:00
Zachary Scott
6b1cd5a10e Merge pull request #17987 from andreynering/ar-validation-doc
Adding information about 'allow_nil' option for 'numericality' [ci skip]
2014-12-09 13:41:10 -08:00
Andrey Nering
5d6c6ec099 Adding information about 'allow_nil' option for 'numericality' [ci skip] 2014-12-09 19:10:50 -02:00
Rafael Mendonça França
7c11ce6fe1 Merge pull request #17988 from caike/master
Add guides for `required` model generator option
2014-12-09 18:55:40 -02:00
Carlos Souza
d2c1d050fc Add guides for required model generator option.
Related to this PR #16062

[ci skip]
2014-12-09 15:35:15 -05:00
Richard Schneeman
44a6ed2fe5 Merge pull request #17982 from andreynering/testing-documentation
Testing Guides: adding TIP about database permission problems [ci skip]
2014-12-10 00:44:35 +08:00
andrey.nering@gmail.com
6d59473b48 Adding a tip in the guides about possible database permission problems on
loading fixtures to the database.

Reference #17542
2014-12-09 13:36:10 -02:00
Rafael Mendonça França
5c7b5dc741 Merge pull request #17975 from merongivian/add_test_for_search_field
Fix options overwritten by super
2014-12-09 13:02:35 -02:00
Jose Añasco
112274ebff Fix options overwritten by super 2014-12-09 09:33:03 -05:00
Akira Matsuda
8e52954349 Unused csv fixture file 2014-12-09 18:54:07 +09:00
Carlos Antonio da Silva
57a6d80515 Merge pull request #17972 from claudiob/remove-unused-callback-fixtures
Remove unused "Developer" fixtures from tests
2014-12-09 07:38:58 -02:00
Rafael Mendonça França
11f491e06a Merge pull request #17977 from yui-knk/fix/typo
[ci skip] Fix typo
2014-12-09 02:09:52 -02:00
yui-knk
083505a7d6 [ci skip] Fix typo 2014-12-09 13:02:03 +09:00
Sean Griffin
65588b7463 Update test case for TZ aware attributes
The test added in 42418cfc94d1356d35d28d786f63e7fab9406ad6 wasn't
actually testing anything, since the bug was with TZ aware attributes
only.
2014-12-08 15:06:11 -07:00
Sean Griffin
42418cfc94 Allow custom handling of non-standard types in time_zone_conversion
PostgreSQL for example, allows infinity as a valid value for date time
columns. The PG type has explicit handling for that case. However, time
zone conversion will end up trampling that handling. Unfortunately, we
can't call super and then convert time zones.

However, if we get back nil from `.in_time_zone`, it's something we
didn't expect so we can let the superclass handle it.

Fixes #17971
2014-12-08 14:52:06 -07:00
claudiob
3502e6ed7c Remove unused "Developer" fixtures from tests
The `RecursiveCallbackDeveloper` and `ImmutableMethodDeveloper` classes
are not used anymore in tests, and neither is the `@cancelled` variable.
2014-12-08 13:07:56 -08:00
Ulisses Almeida + Kassio Borges
075c81feec Add foreign_type option for polymorphic has_one and has_many.
To be possible to use a custom column name to save/read the polymorphic
associated type in a has_many or has_one polymorphic association, now users
can use the option :foreign_type to inform in what column the associated object
type will be saved.
2014-12-08 18:13:15 -02:00
Sean Griffin
7daeb98c76 Don't error when attributes is called on a frozen AR model
`freeze` will ultimately end up freezing the `AttributeSet`, which in
turn freezes its `@attributes` hash. However, we actually insert a
special object to lazily instantiate the values of the hash on demand.
When it does need to actually instantiate all of them for iteration (the
only case is `ActiveRecord::Base#attributes`, which calls
`AttributeSet#to_h`), it will set an instance variable as a performance
optimization

Since it's just an optimization for subsequent calls, and that method
being called at all is a very uncommon case, we can just leave the ivar
alone if we're frozen, as opposed to coming up with some overly
complicated mechanism for freezing which allows us to continue to modify
ourselves.

Fixes #17960
2014-12-08 12:48:24 -07:00
Sean Griffin
4ed60af60d Revert to 4.1 behavior for casting PG arrays
The user is able to pass PG string literals in 4.1, and have it
converted to an array. This is also possible in 4.2, but it would remain
in string form until saving and reloading, which breaks our
`attr = save.reload.attr` contract. I think we should deprecate this in
5.0, and only allow array input from user sources. However, this
currently constitutes a breaking change to public API that did not go
through a deprecation cycle.
2014-12-08 11:42:29 -07:00
Rafael Mendonça França
d428242c86 Only check that it is a Rails application once
Also avoid using try since is_a? is faster for this case.
2014-12-08 15:42:55 -02:00
Rafael Mendonça França
7fb809c033 Merge pull request #17964 from carols10cents/improve-after-commit-argumenterror-message
Make error message clearer that :on requires a symbol, not a string
2014-12-08 15:19:23 -02:00
Rafael Mendonça França
c8284c8025 Merge pull request #17896 from GBH/globbing_route_mailer_preview
fixing mailer previews for apps with globbing route
2014-12-08 15:10:47 -02:00
Rafael Mendonça França
3d06f77ee6 Merge pull request #17969 from tiii/add-brackets-around-attribute_name
add brackets around attribute_name [ci skip]
2014-12-08 14:41:14 -02:00
_tiii
a4b02be067 add brackets around attribute_name
since 'attr_name_will_change!' is not an actual method it should
be clearer that you have to insert the attribute name as in line 104

[ci skip]
2014-12-08 17:39:29 +01:00
Zachary Scott
04bf9fbeda Fix type case of "validations" and word-wrap from #17954 [ci skip] 2014-12-08 08:36:04 -08:00
Zachary Scott
93d5d77834 Merge pull request #17966 from mikechau/update-ar-store-validation-documentation
Add note to Store about uniqueness validation (#17954) [skip ci]
2014-12-08 08:35:10 -08:00
Rafael Mendonça França
78504600f5 Merge pull request #17953 from kirs/test-activejob-generator
Test coverage for ActiveJob generator
2014-12-08 14:31:37 -02:00
Mike Chau
34a8a149c6 Add note to Store about uniqueness validation (#17954) [skip ci] 2014-12-08 02:30:49 -06:00
Richard Schneeman
6f4fd2c632 Merge pull request #17963 from neerajdotname/wordsmitthing
minor sentences fixes
2014-12-08 11:40:43 +08:00
Carol Nichols
ffce60e128 Make error message clearer that :on requires a symbol, not a string
The validation added in 5a3dc8092d19c816b0b1203945639cb91d065847 will
reject values for the `:on` option for after_commit and after_rollback
callbacks that are string values like `"create"`.

However, the error message says ":on conditions for after_commit and
after_rollback callbacks have to be one of create,destroy,update". That
looks like a string value *would* be valid.

This commit changes the error message to say ":on conditions for
after_commit and after_rollback callbacks have to be one of [:create,
:destroy, :update]", making it clearer that symbols are required.
2014-12-07 22:16:00 -05:00
Neeraj Singh
6125221da6 minor sentences fixes 2014-12-07 22:02:02 -05:00
Zachary Scott
9eb4869f80 Merge pull request #17959 from eileencodes/fix-grammar-on-reflection
Fix grammar of sentence in Reflection documentation [ci skip]
2014-12-07 10:42:31 -08:00
eileencodes
480e911859 Fix grammar of sentence in Reflection documentation 2014-12-07 13:36:05 -05:00
Richard Schneeman
4ff026e595 Merge pull request #17950 from y-yagi/postgres_guide
[ci skip] add `enable_extension` to PostgreSQL hstore example
2014-12-07 22:44:15 +08:00