aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Keep column defaults in type cast formSean Griffin2014-06-035-2/+40
| | | | | | | | | | The contract of `_field_changed?` assumes that the old value is always type cast. That is not the case for the value in `Column#default` as things are today. It appears there are other public methods that assume that `Column#default` is type cast, as well. The reason for this change originally was because the value gets put into `@raw_attributes` in initialize. This reverts to the old behavior on `Column`, and updates `initialize` to make sure that the values are in the right format.
* pg, preserve point type when schema dumping.Yves Senn2014-06-036-11/+24
|
* pg test, examples for default values and schema dumping of point types.Yves Senn2014-06-032-0/+32
| | | | /cc @sgrif
* Merge pull request #15483 from ↵Yves Senn2014-06-034-11/+11
|\ | | | | | | | | eileencodes/reuse-available-reflection-polymorphic-methods fix polymorphic? method and reuse it
| * fix polymorphic? method and reuse iteileencodes2014-06-024-11/+11
|/ | | | | | Fix polymorphic to check for `options[:polymorphic]` instead of `options.key? :polymorphic` and then reuse the method `polymorphic?` method instead of constantly checking the same `options[:polymorphic]`.
* call `capture` fewer times from `form_for`Aaron Patterson2014-06-022-4/+4
|
* drastically reduce object allocationsAaron Patterson2014-06-022-8/+15
| | | | | | | | | | before this change, we were allocating AS::SafeBuffer objects that were being interpolated in to a string, so the safe buffer object was being thrown away. This change only allocates a string (vs a string *and* a safebuffer) and interpolates the string. On my test application, this reduced the AS::SafeBuffer objects from 1527k per request to about 500 per request.
* reduce AS::SafeBuffer allocationsAaron Patterson2014-06-021-1/+2
| | | | | | | | | | | | html_escape_interpolated_argument is only used in mutation methods: https://github.com/rails/rails/blob/c07d09559ec171e1904b55c7ad7e8c7d586ca51b/activesupport/lib/active_support/core_ext/string/output_safety.rb#L174 https://github.com/rails/rails/blob/c07d09559ec171e1904b55c7ad7e8c7d586ca51b/activesupport/lib/active_support/core_ext/string/output_safety.rb#L179 The return value doesn't need to be converted to an AS::SafeBuffer since we know that the current object is an AS::SafeBuffer and will be mutated, and the return value from html_escape_interpolated_argument will be thrown away
* Merge pull request #15475 from sgrif/sg-initialize-attributesGuillermo Iguaran2014-06-023-11/+3
|\ | | | | Remove unused `initialize_attributes` method
| * Remove unused `initialize_attributes` methodSean Griffin2014-06-023-11/+3
| | | | | | | | | | This was previously a hook for a special case related to `serialize`, which has since been removed.
* | concat is a hotspot (via AV#append=), so just directly define the methodsAaron Patterson2014-06-021-4/+6
| |
* | Merge pull request #15477 from aripollak/actioncontroller-overview-typoArthur Nogueira Neves2014-06-021-2/+2
|\ \ | | | | | | Fix typo in ActionController Overview
| * | Fix typo in ActionController OverviewAri Pollak2014-06-021-2/+2
|/ / | | | | | | * Should say "sensitive" instead of "sensible"
* | Merge pull request #15474 from unixmonkey/masterRafael Mendonça França2014-06-021-1/+1
|\ \ | | | | | | File.exist? instead of File.exists? in bin/setup
| * | File.exist? instead of File.exists? in bin/setupDavid Jones2014-06-021-1/+1
| |/ | | | | | | | | File.exists? is deprecated in Ruby 2.1+ https://github.com/ruby/ruby/blob/v2_1_2/file.c#L1413
* | Merge pull request #15473 from sgrif/sg-missing-colonZachary Scott2014-06-021-1/+1
|\ \ | |/ |/| Add missing colon to internal [ci skip]
| * Add missing colon to internalSean Griffin2014-06-021-1/+1
|/
* just use `assert`Aaron Patterson2014-06-021-1/+1
|
* Merge pull request #15379 from xuanxu/rational_precisionRafael Mendonça França2014-06-024-5/+17
|\ | | | | Fix AS::NumberHelper results with rationals
| * Fix AS::NumberHelper results with rationalsJuanjo Bazán2014-05-314-5/+17
| | | | | | | | | | | | | | | | | | | | :precision was incorrectly being applied to Rationals before: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.3" after: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.33"
* | Merge pull request #15464 from tgxworld/improve_notifications_logicMatthew Draper2014-06-032-8/+18
|\ \ | | | | | | Improvements to ActiveSupport::Notifications.
| * | Avoid looping through subscribers when unsubscribing with a subscriber object.Guo Xiang Tan2014-06-011-5/+10
| | |
| * | Update documentation to reflect unsubscription with name.Guo Xiang Tan2014-06-012-4/+9
| | |
* | | docs, fix typo [ci skip]Yves Senn2014-06-021-2/+2
| | |
* | | test pg, add basic test cases for point datatype.Yves Senn2014-06-021-0/+45
| | |
* | | pg, inline casting methods into `OID::Type` objects.Yves Senn2014-06-024-44/+25
| | | | | | | | | | | | | | | | | | | | | | | | This inlines casting for the most obvious types. The rest will follow eventually. I need to put some tests in place, to make sure that the inlining is not causing regressions. /cc @sgrif
* | | Feature requests should be made on the mailing list, not submitted toZachary Scott2014-06-017-7/+40
| | | | | | | | | | | | the issue tracker. See also #15455 [ci skip]
* | | Merge pull request #15444 from sgrif/sg-yaml-new-recordGuillermo Iguaran2014-06-014-2/+28
|\ \ \ | | | | | | | | New records should remain new after yaml serialization
| * | | New records should remain new after yaml serializationSean Griffin2014-06-014-2/+28
|/ / /
* | | :nail_care: for migrations guide from #15457 [ci skip]Zachary Scott2014-06-011-7/+8
| | |
* | | Merge pull request #15457 from maurogeorge/add-changing-columnsZachary Scott2014-06-011-0/+22
|\ \ \ | | | | | | | | Create Changing Columns on migrations guides [ci skip]
| * | | Create Changing Columns on migrations guidesMauro George2014-06-011-0/+22
| | | | | | | | | | | | | | | | [ci skip]
* | | | Remove docs regarding grouping multiple values, as we should avoidZachary Scott2014-06-011-18/+1
| | | | | | | | | | | | | | | | duplicating API reference in guides. Also :scissors: [ci skip]
* | | | Merge pull request #15459 from maurogeorge/add-total-grouped-itemsZachary Scott2014-06-011-0/+34
|\ \ \ \ | |_|/ / |/| | | Add Total of grouped items to Active Record query interface on guides [ci skip]
| * | | Add Total of grouped items to AR query interface on guidesMauro George2014-06-011-0/+34
| |/ / | | | | | | | | | [ci skip]
* | | Merge pull request #15435 from sgrif/sg-rm-serializationYves Senn2014-06-0112-103/+30
|\ \ \ | | | | | | | | Remove most code related to serialized properties
| * | | Remove most code related to serialized propertiesSean Griffin2014-06-0112-103/+30
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nearly completely implemented in terms of custom properties. `_before_type_cast` now stores the raw serialized string consistently, which removes the need to keep track of "state". The following is now consistently true: - `model.serialized == model.reload.serialized` - A model can be dumped and loaded infinitely without changing - A model can be saved and reloaded infinitely without changing
* | | Merge pull request #15432 from sgrif/sg-coder-type-castingYves Senn2014-06-014-23/+14
|\ \ \ | | | | | | | | Don't change values in `@raw_attributes` during serialization
| * | | Don't change values in `@raw_attributes` during serializationSean Griffin2014-06-014-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | During `init_with`, the attributes given to the coder will be placed into `@raw_attributes`. As such, we should read from `@raw_attributes` when encoding, rather than `@attributes`, which has been type cast.
* | | | Merge pull request #14881 from robin850/patch-19Yves Senn2014-06-011-5/+8
|\ \ \ \ | | | | | | | | | | Swallow bundler exceptions when running tests
| * | | | Swallow bundler exceptions when running testsRobin Dupret2014-04-271-5/+8
| | | | | | | | | | | | | | | | | | | | Let's avoid useless output when testing stuff related to Bundler.
* | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-06-014-6/+11
|\ \ \ \ \
| * | | | | document generators hidden_namespacesschneems2014-05-291-0/+5
| | | | | |
| * | | | | [ci skip] add created_at and updated_at to exampleschneems2014-05-291-2/+2
| | | | | |
| * | | | | [ci skip] Fix Compiler's Github linkHarshad Sabne2014-05-271-1/+1
| | | | | |
| * | | | | :scissors:Zachary Scott2014-05-121-3/+3
| | | | | |
* | | | | | Merge pull request #15456 from jonatack/patch-7Matthew Draper2014-06-011-2/+2
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | config.assets.digests -> config.assets.digest
| * | | | | config.assets.digests -> config.assets.digestJon Atack2014-06-011-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | in Asset Pipeline guide. [skip ci]
* | | | | Removed 'Caching with Rails' guide from WIP, this guide isn't ready toZachary Scott2014-05-311-5/+0
| | | | | | | | | | | | | | | | | | | | be published and requires more attention. [ci skip]
* | | | | Merge pull request #15449 from aditya-kapoor/correct-debug-docRichard Schneeman2014-05-311-5/+1
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] correct doc for ActionView::Helpers::DebugHelper