aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #15452 from matthewd/live-abortMatthew Draper2014-06-084-13/+189
|\ \ | | | | | | Handle client disconnect during live streaming
| * | Handle client disconnect during live streamingMatthew Draper2014-06-084-13/+189
| | | | | | | | | | | | .. even when the producer is blocked for a write.
* | | Merge pull request #15567 from aditya-kapoor/add-casesRafael Mendonça França2014-06-071-0/+11
|\ \ \ | | | | | | | | Add Additional Test Cases for the constantize
| * | | Add Missing Test Cases for the constantizeAditya Kapoor2014-06-071-0/+11
| |/ /
* | | Merge pull request #15566 from kuldeepaggarwal/fix-buildRafael Mendonça França2014-06-071-3/+3
|\ \ \ | | | | | | | | fix test cases after #15558 merge to master.
| * | | fix test cases after #15558 merge to master.Kuldeep Aggarwal2014-06-071-3/+3
|/ / /
* | | Merge pull request #15558 from sgrif/sg-rename-propertyRafael Mendonça França2014-06-077-25/+25
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename `property` to `attribute` Conflicts: activerecord/lib/active_record/attribute_methods/serialization.rb activerecord/lib/active_record/base.rb
| * | | Rename `property` to `attribute`Sean Griffin2014-06-078-26/+26
| | | | | | | | | | | | | | | | For consistency with https://github.com/rails/rails/pull/15557
* | | | Merge pull request #15546 from sgrif/sg-lazy-decoratorsRafael Mendonça França2014-06-077-16/+179
|\ \ \ \ | |_|/ / |/| | | Don't query the database schema when calling `serialize`
| * | | Don't query the database schema when calling `serialize`Sean Griffin2014-06-077-16/+179
| | |/ | |/| | | | | | | | | | | | | We need to decorate the types lazily. This is extracted to a separate API, as there are other refactorings that will be able to make use of it, and to allow unit testing the finer points more granularly.
* | | Merge pull request #15561 from sgrif/sg-time-zone-aware-arraysRafael Mendonça França2014-06-072-1/+13
|\ \ \ | | | | | | | | Ensure time zones don't change after round trip with array columns
| * | | Ensure time zones don't change after round trip with array columnsSean Griffin2014-06-072-1/+13
| | | | | | | | | | | | | | | | | | | | The times would be equivalent, even if they were in different time zones. E.g. 12:00 UTC == 5:00 PDT
* | | | Merge pull request #15562 from sgrif/sg-double-type-cast-dirtyRafael Mendonça França2014-06-075-25/+27
|\ \ \ \ | | | | | | | | | | Do not type cast twice on attribute assignment
| * | | | Do not type cast twice on attribute assignmentSean Griffin2014-06-075-25/+27
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The definition of `write_attribute` in dirty checking ultimately leads to the columns calling `type_cast` on the value to perform the comparison. However, this is a potentially expensive computation that we cache when it occurs in `read_attribute`. The only case that we need the non-type-cast form is for numeric, so we pass that through as well (something I'm looking to remove in the future). This also reduces the number of places that manually access various stages in an attribute's type casting lifecycle, which will aid in one of the larger refactorings that I'm working on.
* | | | Merge pull request #15560 from aditya-kapoor/guide-fixesRafael Mendonça França2014-06-071-7/+6
|\ \ \ \ | | | | | | | | | | Correct Example output in Rails guides [ci skip]
| * | | | Correct Example output in Rails guides [ci skip]Aditya Kapoor2014-06-071-7/+6
| | |_|/ | |/| |
* | | | Merge pull request #15564 from sgrif/sg-remove-dead-codeRafael Mendonça França2014-06-071-7/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove dead branch when restoring ID within a transaction Conflicts: activerecord/lib/active_record/transactions.rb
| * | | | Remove dead branch when restoring ID within a transactionSean Griffin2014-06-071-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no way to have an instance of an Active Record model where `has_attribute?(self.class.primary_key)` returns false. The record is always initialized in such a way that `@raw_attributes` will have an id key with nil for the value.
* | | | | Merge pull request #15565 from sgrif/sg-no-unfreezingRafael Mendonça França2014-06-072-4/+8
|\ \ \ \ \ | |/ / / / |/| | | | Move conditionals about freezing closer to the definition of `freeze`
| * | | | Move conditionals about freezing closer to the definition of `freeze`Sean Griffin2014-06-072-4/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Reduces the number of places that care about the internals of how we store and type cast attributes. We do not need to go through the dup/freeze dance, as you couldn't have saved a frozen new record anyway, and that is the only time we would end up modifying the frozen hash.
* | | | Merge pull request #15563 from sgrif/sg-raw-attributes-accessRafael Mendonça França2014-06-072-3/+3
|\ \ \ \ | |_|/ / |/| | | Remove duplicated `@raw_attributes.keys`
| * | | 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
| | | | |