aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove duplicated `@raw_attributes.keys`Sean Griffin2014-06-072-3/+3
| | | | | Reduces the number of things outside of attribute methods that cares about the details of how we store and type cast attributes
* Merge pull request #15557 from sgrif/sg-specify-time-zoneMatthew Draper2014-06-081-5/+10
|\ | | | | Specify a time zone when testing TZ aware attributes
| * Don't rely on `Time.current` in testsSean Griffin2014-06-071-5/+10
| | | | | | | | Millisecond inequality causes failures on Travis
* | changelog for #15556 and credit @kuldeepaggarwal [Kuldeep Aggarwal]Yves Senn2014-06-072-2/+6
|/ | | | | | This is a follow up to #15556 @kuldeepaggarwal did submit this patch way back (#13624).
* Merge pull request #15556 from sgrif/sg-time-zone-aware-arraysYves Senn2014-06-072-1/+29
|\ | | | | Add array support when time zone aware attributes are enabled
| * Add array support when time zone aware attributes are enabledSean Griffin2014-06-072-1/+29
| |
* | adds some details to the rationale of converted_arrays [ci skip]Xavier Noria2014-06-072-1/+5
| |
* | adds a regression test for the strong params converted arrays cacheXavier Noria2014-06-071-1/+18
| | | | | | | | This is a regression test for 29844dd.
* | Revert "Convert StrongParameters cache to a hash. This fixes an unbounded"Xavier Noria2014-06-072-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot cache keys because arrays are mutable. We rather want to cache the arrays. This behaviour is tailor-made for the usage pattern strongs params is designed for. In a forthcoming commit I am going to add a test that covers why we need to cache by value. Every strong params instance has a live span of a request, the cache goes away with the object. Since strong params have such a concrete intention, it would be interesting to see if there are actually any real-world use cases that are an actual leak, one that practically may matter. I am not convinced that the theoretical leak has any practical consequences, but if it can be shown there are, then I believe we should either get rid of the cache (which is an optimization), or else wipe it in the mutating API. This reverts commit e63be2769c039e4e9ada523a8497ce3206cc8a9b.
* | copy edits [ci skip]Vijay Dev2014-06-072-2/+2
| |
* | Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-06-072-4/+13
|\ \
| * | [ci skip] remove double "in your"schneems2014-06-041-1/+1
| | |
| * | [ci skip] explain association behavior. schneems2014-06-021-0/+6
| | | | | | | | | | | | | | | When you manually specify `id:` attribute in a fixture Rails' built in association assignment feature will no longer work. http://stackoverflow.com/questions/23985675/incorrect-association-in-fixtures This commit raises awareness of this behavior and encourages developers to look directly at the fixture documentation.
| * | [ci skip] add fixture docs link to guidesschneems2014-06-021-1/+3
| | | | | | | | | The fixtures API docs are really comprehensive. We should either be driving people there, or perhaps making fixtures its own guide.
| * | [ci skip] less derogatory explanation of defaultsschneems2014-06-021-2/+3
| | |
| * | [ci skip] fix "note" syntaxschneems2014-06-021-1/+1
| | |
* | | Merge pull request #15555 from akshay-vishnoi/doc_changesXavier Noria2014-06-078-26/+26
|\ \ \ | | | | | | | | Fix capitalization
| * | | [ci skip] Fix capitalizationAkshay Vishnoi2014-06-078-26/+26
|/ / /
* | | Merge pull request #15542 from Gaurav2728/gaurav-remove_shutdown_linkArthur Nogueira Neves2014-06-069-15/+17
|\ \ \ | | | | | | | | remove rubyforge.org that was shut down [ci skip]
| * | | remove rubyforge.org that was shut down [ci skip]Gaurav Sharma2014-06-069-15/+17
| | | |
* | | | Unwrap another html_escapeMatthew Draper2014-06-071-2/+2
| | | | | | | | | | | | | | | | /cc @tenderlove
* | | | Merge pull request #15554 from sgrif/sg-klassRafael Mendonça França2014-06-066-21/+0
|\ \ \ \ | |_|_|/ |/| | | Removed unused `klass` definitions from types
| * | | Removed unused `klass` definitions from typesSean Griffin2014-06-066-21/+0
|/ / / | | | | | | | | | Only `Date` and `Time` are handled.
* | | eliminate more wasteful allocationsAaron Patterson2014-06-061-2/+2
| | |
* | | Merge pull request #15552 from sgrif/sg-remove-klass-special-caseRafael Mendonça França2014-06-062-4/+7
|\ \ \ | | | | | | | | Remove composed_of special case from multi-parameter attributes
| * | | Remove composed_of special case from multi-parameter attributesSean Griffin2014-06-062-4/+7
| | | | | | | | | | | | | | | | | | | | As we move towards removing the `klass` method from `column`, the else clause as it stands right now will become the only case.
* | | | Merge pull request #15551 from sgrif/sg-numeric-typesRafael Mendonça França2014-06-062-9/+9
|\ \ \ \ | | | | | | | | | | Don't mess with `_before_type_cast` for numeric types
| * | | | Don't mess with `_before_type_cast` for numeric typesSean Griffin2014-06-062-9/+9
| |/ / /
* | | | remove another wasteful AS::SafeBuffer allocationAaron Patterson2014-06-061-1/+1
| | | |
* | | | eliminate wasteful AS::SafeBuffer allocationAaron Patterson2014-06-061-1/+1
| | | |
* | | | Revert "Merge pull request #15550 from sgrif/sg-numeric-types"Rafael Mendonça França2014-06-061-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit be1db9946616a4005bb7be45656cc0f84d75d915, reversing changes made to 6680ee9427ae2639e404cd3b9538f54e136057c6. Reason: This changed a behavior where numeric attributes when receiving blank values didn't change its value.
* | | | Merge pull request #15550 from sgrif/sg-numeric-typesRafael Mendonça França2014-06-061-7/+8
|\ \ \ \ | |/ / / |/| | | Don't mess with `_before_type_cast` for numeric types
| * | | Don't mess with `_before_type_cast` for numeric typesSean Griffin2014-06-061-7/+8
|/ / /
* | | Merge pull request #15548 from ↵Yves Senn2014-06-061-0/+4
|\ \ \ | |/ / |/| | | | | | | | zuhao/refactor_actionmailer_i18n_with_controller_test Restore I18n.locale to default after test.
| * | Restore I18n.locale to default after test.Zuhao Wan2014-06-071-0/+4
|/ / | | | | | | | | | | | | | | | | | | If i18n_with_controller_test.rb were to run first, the I18n.locale will be changed to :de, and the following tests in base_test.rb will fail: "subject gets default from I18n" “default subject can have interpolations” "translations are scoped properly" "implicit multipart with default locale"
* | Merge pull request #15544 from zuhao/refactor_actionmailer_test_caseSantiago Pastorino2014-06-061-0/+8
|\ \ | | | | | | Restore test deliveries properly in ActionMailer.
| * | Restore test deliveries properly in ActionMailer.Zuhao Wan2014-06-071-0/+8
|/ / | | | | | | | | | | | | | | | | | | | | `ActionMailer::Base.delivery_method` and `ActionMailer::Base.perform_deliveries` have leaked states. "delivery method can be customized per instance" and "delivery method can be customized in subclasses not changing the parent" in delivery_methods_test.rb will fail if test_helper_test.rb (in which TestHelperMailerTest is inherited from ActionMailer::TestCase) runs before it.
* | Merge pull request #15533 from sgrif/sg-missing-schema-testsYves Senn2014-06-061-0/+29
|\ \ | | | | | | Add missing test cases for schema dumping defaults
| * | Add missing test cases for schema dumping defaultsSean Griffin2014-06-061-0/+29
| | |
* | | credit JoseLuis Torres for #15051. [JoseLuis Torres]Yves Senn2014-06-061-1/+1
| | | | | | | | | | | | [ci skip]
* | | `ActiveRecord::SchemaMigration` has no primary key.Yves Senn2014-06-063-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, using `ActiveRecord::Base.primary_key_prefix_type` with `:table_name_with_underscore` would change the `SchemaMigration` model to have a primary key. This resulted in broken queries for PG because it tried to return the inserted PK (which does not exist). Closes #15051. Closes #15419.
* | | test refactor, don't hardcode default for `table_name_prefix`.Yves Senn2014-06-061-1/+2
| | |
* | | test refactor, don't hardcode `primary_key_prefix_type` default.Yves Senn2014-06-061-0/+3
| | | | | | | | | | | | /cc @zuhao
* | | serialized Type should delegate `type_cast_for_write` to underlying TypeYves Senn2014-06-062-1/+36
|/ / | | | | | | | | | | | | This adds a regression test for #14411, which was fixed by #15503. Closes #14411 Closes #14595
* | Merge pull request #15503 from sgrif/sg-json-hstore-storageYves Senn2014-06-069-20/+29
|\ \ | | | | | | Bring type casting behavior of hstore/json in line with serialized
| * | Bring type casting behavior of hstore/json in line with serializedSean Griffin2014-06-049-20/+29
| | | | | | | | | | | | | | | `@raw_attributes` should not contain the type-cast, mutable version of the value.
* | | Merge pull request #15540 from nbibler/http-headers-setYves Senn2014-06-061-8/+21
|\ \ \ | | | | | | | | Use a frozen Set instance for CGI_VARIABLES.
| * | | Use a frozen Set instance for CGI_VARIABLES.Nathaniel Bibler2014-06-051-8/+21
| | | | | | | | | | | | Also expand the CGI_VARIABLE name listing to multiple lines for cleaner diffs and legibility.
* | | | `bin/rake db:migrate:status` works with legacy migration numbers.Yves Senn2014-06-065-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The migration numbers were normalized different ways. This left the task output in an inconsistent state. Closes #15538.
* | | | docs, update `includes` + `where` example in AR guide. [ci skip]Yves Senn2014-06-061-3/+16
| | | | | | | | | | | | | | | | Closes #15541.