aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor `quoted_date`Ryuta Kamizono2014-12-114-25/+13
| | | | Move microseconds formatting to `AbstractAdapter`.
* Merge pull request #17970 from ulissesalmeida/foreign-type-has-many-has-oneRafael Mendonça França2014-12-1010-3/+53
|\ | | | | Add foreign_type option for polymorphic has_one and has_many.
| * Add foreign_type option for polymorphic has_one and has_many.Ulisses Almeida + Kassio Borges2014-12-0810-3/+53
| | | | | | | | | | | | | | 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.
* | Merge pull request #17989 from y-yagi/patch-1Zachary Scott2014-12-091-1/+1
|\ \ | | | | | | [ci skip] fix typo in MessageVerifier#verify docs
| * | [ci skip] fix typo in MessageVerifier#verify docsyuuji.yaginuma2014-12-101-1/+1
|/ /
* | Merge pull request #17987 from andreynering/ar-validation-docZachary Scott2014-12-091-0/+2
|\ \ | | | | | | Adding information about 'allow_nil' option for 'numericality' [ci skip]
| * | Adding information about 'allow_nil' option for 'numericality' [ci skip]Andrey Nering2014-12-091-0/+2
| | |
* | | Merge pull request #17988 from caike/masterRafael Mendonça França2014-12-091-0/+2
|\ \ \ | | | | | | | | Add guides for `required` model generator option
| * | | Add guides for `required` model generator option.Carlos Souza2014-12-091-0/+2
|/ / / | | | | | | | | | | | | | | | Related to this PR #16062 [ci skip]
* | | Merge pull request #17982 from andreynering/testing-documentationRichard Schneeman2014-12-101-0/+2
|\ \ \ | | | | | | | | Testing Guides: adding TIP about database permission problems [ci skip]
| * | | Adding a tip in the guides about possible database permission problems onandrey.nering@gmail.com2014-12-091-0/+2
| |/ / | | | | | | | | | | | | | | | loading fixtures to the database. Reference #17542
* | | Merge pull request #17975 from merongivian/add_test_for_search_fieldRafael Mendonça França2014-12-093-11/+15
|\ \ \ | |/ / |/| | Fix options overwritten by super
| * | Fix options overwritten by superJose Añasco2014-12-093-11/+15
|/ /
* | Unused csv fixture fileAkira Matsuda2014-12-091-1/+0
| |
* | Merge pull request #17972 from claudiob/remove-unused-callback-fixturesCarlos Antonio da Silva2014-12-091-46/+0
|\ \ | | | | | | Remove unused "Developer" fixtures from tests
| * | Remove unused "Developer" fixtures from testsclaudiob2014-12-081-46/+0
| |/ | | | | | | | | The `RecursiveCallbackDeveloper` and `ImmutableMethodDeveloper` classes are not used anymore in tests, and neither is the `@cancelled` variable.
* | Merge pull request #17977 from yui-knk/fix/typoRafael Mendonça França2014-12-091-1/+1
|\ \ | | | | | | [ci skip] Fix typo
| * | [ci skip] Fix typoyui-knk2014-12-091-1/+1
|/ /
* | Update test case for TZ aware attributesSean Griffin2014-12-081-4/+14
| | | | | | | | | | | | The test added in 42418cfc94d1356d35d28d786f63e7fab9406ad6 wasn't actually testing anything, since the bug was with TZ aware attributes only.
* | Allow custom handling of non-standard types in `time_zone_conversion`Sean Griffin2014-12-082-1/+7
|/ | | | | | | | | | | | 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
* Don't error when `attributes` is called on a frozen AR modelSean Griffin2014-12-082-1/+11
| | | | | | | | | | | | | | | | | | `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
* Revert to 4.1 behavior for casting PG arraysSean Griffin2014-12-082-5/+23
| | | | | | | | | | 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.
* Only check that it is a Rails application onceRafael Mendonça França2014-12-081-5/+7
| | | | Also avoid using try since is_a? is faster for this case.
* Merge pull request #17964 from ↵Rafael Mendonça França2014-12-082-1/+5
|\ | | | | | | | | carols10cents/improve-after-commit-argumenterror-message Make error message clearer that :on requires a symbol, not a string
| * Make error message clearer that :on requires a symbol, not a stringCarol Nichols2014-12-072-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #17896 from GBH/globbing_route_mailer_previewRafael Mendonça França2014-12-082-1/+12
|\ \ | | | | | | fixing mailer previews for apps with globbing route
| * | fixing mailer previews for apps with globbing routeOleg2014-12-032-1/+12
| | |
* | | Merge pull request #17969 from tiii/add-brackets-around-attribute_nameRafael Mendonça França2014-12-081-1/+1
|\ \ \ | | | | | | | | add brackets around attribute_name [ci skip]
| * | | add brackets around attribute_name_tiii2014-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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]
* | | | Fix type case of "validations" and word-wrap from #17954 [ci skip]Zachary Scott2014-12-081-2/+3
| | | |
* | | | Merge pull request #17966 from mikechau/update-ar-store-validation-documentationZachary Scott2014-12-081-1/+4
|\ \ \ \ | | | | | | | | | | Add note to Store about uniqueness validation (#17954) [skip ci]
| * | | | Add note to Store about uniqueness validation (#17954) [skip ci]Mike Chau2014-12-081-1/+4
| |/ / /
* | | | Merge pull request #17953 from kirs/test-activejob-generatorRafael Mendonça França2014-12-081-0/+29
|\ \ \ \ | |/ / / |/| | | Test coverage for ActiveJob generator
| * | | Test coverage for ActiveJob generatorKir Shatrov2014-12-071-0/+29
| | | |
* | | | Merge pull request #17963 from neerajdotname/wordsmitthingRichard Schneeman2014-12-081-3/+3
|\ \ \ \ | |_|_|/ |/| | | minor sentences fixes
| * | | minor sentences fixesNeeraj Singh2014-12-071-3/+3
|/ / /
* | | Merge pull request #17959 from eileencodes/fix-grammar-on-reflectionZachary Scott2014-12-071-3/+3
|\ \ \ | | | | | | | | Fix grammar of sentence in Reflection documentation [ci skip]
| * | | Fix grammar of sentence in Reflection documentationeileencodes2014-12-071-3/+3
|/ / /
* | | Merge pull request #17950 from y-yagi/postgres_guideRichard Schneeman2014-12-071-0/+3
|\ \ \ | | | | | | | | [ci skip] add `enable_extension` to PostgreSQL hstore example
| * | | [ci skip] add `enable_extension` to PostgreSQL hstore exampleyuuji.yaginuma2014-12-071-0/+3
|/ / /
* | | Merge pull request #17944 from tjschuck/mounted_named_routes_regressionSantiago Pastorino2014-12-062-14/+43
|\ \ \ | | | | | | | | Mounted Rack apps should have default named routes based on app name
| * | | Mounted Rack apps should have default named routes based on app nameT.J. Schuck2014-12-062-14/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression in 4.2.0 from 4.1.8. https://github.com/rails/rails/pull/17823 fixed a similar regression regarding _explicitly_ named routes for a mounted Rack app, but there was another regression for the default value. With a route like: Rails.application.routes.draw do mount Mountable::Web, at: 'some_route' end The "Prefix" column of rake routes gives the following: - 4.1.8: mountable_web - 4.2.0.beta1-4: [nothing] - 4.2.0.rc1: [nothing] - 4.2.0.rc2: some_route <- regression This fixes the default to go back to being based off the name of the class like the docs specify: https://github.com/rails/rails/blob/785d04e3109f69d0b9b9f4732179592f0ef04e52/actionpack/lib/action_dispatch/routing/mapper.rb#L558-L560 Explicitly named routes still work correctly per https://github.com/rails/rails/pull/17823: Rails.application.routes.draw do mount Mountable::Web, at: 'some_route', as: 'named' end - 4.1.8: named - 4.2.0.beta1-4: [nothing] - 4.2.0.rc1: [nothing] - 4.2.0.rc2: named
* | | | Merge pull request #17942 from yui-knk/fix/upgrading.mdRichard Schneeman2014-12-061-1/+1
|\ \ \ \ | | | | | | | | | | [ci skip] update rails version to 3.2.21
| * | | | [ci skip] update rails version to 3.2.21yui-knk2014-12-061-1/+1
| |/ / /
* | | | Merge pull request #17943 from jeremywadsack/doc_cache_importabilityRichard Schneeman2014-12-061-0/+4
|\ \ \ \ | |/ / / |/| | | Add Guides note to change cache namespace
| * | | Add Guides note to change cache name space as Entry data is incompatible ↵Jeremy Wadsack2014-12-041-0/+4
| | | | | | | | | | | | | | | | between 3.2 and 4.0
* | | | Add `force: true` to tables created in PG testsSean Griffin2014-12-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | If the tests are interupted and the teardown block doesn't run, the developer needs to delete these manually in order to be able to run the tests again.
* | | | Correctly respect subtypes for PG arrays and rangesSean Griffin2014-12-053-10/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type registration was simply looking for the OID, and eagerly fetching/constructing the sub type when it was registered. However, numeric types have additional parameters which are extracted from the actual SQL string of the type during lookup, and can have their behavior change based on the result. We simply need to use the block form of registration, and look up the subtype lazily instead. Fixes #17935
* | | | Merge pull request #17932 from brooksreese/masterRafael Mendonça França2014-12-052-2/+2
|\ \ \ \ | | | | | | | | | | Fix grammar in Rakefile markup [ci skip]
| * | | | Fix sentence structure [ci skip]Brooks Reese2014-12-051-1/+1
| | | | |