Rafael Mendonça França
8c679fe0ca
Fix isolated tests
2014-02-01 18:29:41 -02:00
Rafael Mendonça França
a60ccadbf0
Merge pull request #13911 from davidcelis/remove-bigdecimal-serialization
...
Deprecate custom BigDecimal serialization
Conflicts:
activesupport/CHANGELOG.md
2014-02-01 18:03:21 -02:00
David Celis
c87b27ebde
Remove BigDecimal#to_d
...
This was backported for Ruby 1.8 support and is no longer needed.
Signed-off-by: David Celis <me@davidcel.is>
2014-02-01 10:45:57 -08:00
David Celis
85d820b169
Don't require BigDecimal serialization extension
...
Rails currently provides an extension to BigDecimal that redefines how
it is serialized to YAML. However, as noted in #12467 , this does not
work as expected. When ActiveSupport is required, BigDecimal YAML
serialization does not maintain the object type. It instead ends up
serializing the number represented by the BigDecimal itself which, when
loaded by YAML later, becomes a Float:
```ruby
require 'yaml'
require 'bigdecimal'
yaml = BigDecimal('13.37').to_yaml
YAML.load(yaml).class
require 'active_support/all'
yaml = BigDecimal('13.37').to_yaml
YAML.load(yaml).class
```
@tenderlove posits that we should deprecate the custom BigDecimal
serialization and let Ruby handle it. For the time being, users who
require this serialization for backwards compatibility can manually
`require 'active_support/core_ext/big_decimal/yaml_conversions'`.
This will close #12467 and deprecate the custom BigDecimal#to_yaml.
Signed-off-by: David Celis <me@davidcel.is>
2014-02-01 10:45:51 -08:00
Rafael Mendonça França
682a579b25
Remove warnings for already defined methods
2014-02-01 16:27:58 -02:00
Rafael Mendonça França
cd93d7175e
Make arel methods private API
...
Since its conception arel was made to be private API of Active Record.
If users want to use arel features directly we should provide a way
using the Active Record API without exposing the arel implementation.
2014-02-01 16:16:06 -02:00
Rafael Mendonça França
83ea905fd1
Merge pull request #13688 from jbaudanza/psql-index-exists
...
PostgreSQL implementation of SchemaStatements#index_name_exists?
Conflicts:
activerecord/CHANGELOG.md
2014-02-01 16:01:38 -02:00
Rafael Mendonça França
e9be1c1e80
Merge pull request #13863 from joshjordan/jsj-dont-throw-out-get-params
...
Do not discard query parameters on requests that use wrap_parameters
Conflicts:
actionpack/CHANGELOG.md
2014-02-01 15:53:27 -02:00
Rafael Mendonça França
989923e5a4
Merge pull request #13912 from mauricio/bug-13907
...
Fixes issue with parsing whitespace content back from database - fixes #13907
2014-02-01 09:45:46 -08:00
Rafael Mendonça França
82701cd61e
Merge pull request #12769 from birkirb/master
...
Boolean parser blows up on a Fixnum.
Conflicts:
activesupport/CHANGELOG.md
2014-02-01 14:49:32 -02:00
Mauricio Linhares
a34c10f73e
Fixes issue with parsing whitespace content back from database - fixes #13907
2014-02-01 09:38:43 -03:00
Aaron Patterson
9b2a017aa8
this class depends on JoinHelper, so we should require it
2014-01-31 14:10:31 -08:00
Aaron Patterson
3fbff7811b
just require the template resolver
...
LookupContext is eagerly loaded, and FallbackFileSystemResolver is
referenced at the class level. Just require the resolver from the
eagerly loaded class rather than jumping through autoload hoops
2014-01-31 12:05:50 -08:00
Aaron Patterson
e8fcd599ba
only ask for the location filters once
2014-01-31 12:00:54 -08:00
Aaron Patterson
0b10180444
FilterRedirect is referenced at the class level from the Response
...
We can just require the file rather than going through the autoload
indirection
2014-01-31 11:54:42 -08:00
Andrew White
63f8fabe49
Maintain the current timezone in wrap_with_time_zone
...
Extend the solution from the fix for #12163 to the general case where
`Time` methods are wrapped with a time zone.
Fixes #12596 .
2014-01-31 17:13:12 +00:00
Rafael Mendonça França
f484df79f2
Merge pull request #13780 from rohitpaulk/patch-1
...
Updated association_basics.md
2014-01-31 04:06:56 -08:00
Carlos Antonio da Silva
8c7e8b4f18
Minor changelog improvements [ci skip]
2014-01-31 08:02:56 -02:00
Carlos Antonio da Silva
8ea797809d
Merge pull request #13900 from zzak/issue_12963
...
Document default trim mode for Erubis and affected ERB tags. Fixes #12963 [ci skip]
2014-01-31 01:57:00 -08:00
Carlos Antonio da Silva
5df52961f7
Merge pull request #13896 from laurocaetano/dangerous_association_names
...
Associations now raises `ArgumentError` on name conflicts. Closes #13217 .
2014-01-31 01:41:24 -08:00
Zachary Scott
0a4466b7e8
Document default trim mode for Erubis and affected ERB tags [ci skip]
...
Fixes #12963
2014-01-31 00:25:52 -08:00
Godfrey Chan
530cab328e
Merge pull request #13898 from timfenney/my_branch
...
Remove unused variable.
2014-01-30 22:21:50 -08:00
Rohit Paul Kuruvilla
464d47eaaf
Updated association_basics.md [ci skip]
...
Updated association_basics.md to include how to write migrations for self joins
Update association_basics.md
Corrected the update
Update association_basics.md
Typo fix
Changed :employee to :manager
2014-01-31 11:31:19 +05:30
Tim Fenney
16648979f7
Remove unused variable.
2014-01-31 00:50:09 -05:00
Lauro Caetano
4506dd2f07
Associations now raise ArgumentError
on name conflicts.
...
Dangerous association names conflicts include instance or class
methods already defined by `ActiveRecord::Base`.
2014-01-31 00:29:48 -02:00
Josh Jordan
1f9586fd47
Do not discard query parameters on requests that use wrap_parameters
2014-01-30 18:20:55 -05:00
Rafael Mendonça França
f64c50a092
Merge pull request #13859 from huoxito/let-it-go
...
Let `unscope` ignore non Arel scope.where_values
2014-01-30 14:28:29 -08:00
Washington Luiz
abc19c37ae
Let unscope
ignore non Arel scope.where_values
2014-01-30 18:35:27 -03:00
Rafael Mendonça França
27aedeeb0b
Merge pull request #13886 from arthurnn/fix_relation_arel
...
Fix regression on .select method
2014-01-30 12:14:38 -08:00
Rafael Mendonça França
32bdbdd16f
Merge pull request #13612 from eval/issue-13588
...
Add CreateMigration action
2014-01-30 11:11:45 -08:00
Arthur Neves
b7fcad8ff0
Fix regression on .select_*
methods.
...
This was a common pattern:
```
query = author.posts.select(:title)
connection.select_one(query)
```
However `.select` returns a ActiveRecord::AssociationRelation, which has
the bind information, so we can use that to get the right sql query.
Also fix select_rows on postgress and sqlite3 that were not using the binds
[fixes #7538 ]
[fixes #12017 ]
[related #13731 ]
[related #12056 ]
2014-01-30 14:06:40 -05:00
Yves Senn
d4d041c1fe
fix typo and indent. [ci skip]
2014-01-30 17:40:28 +01:00
Yves Senn
2d46e77f6b
Merge pull request #13774 from prathamesh-sonpatki/post-to-article
...
Replace Post model with Article model in getting started guide [ci skip]
2014-01-30 07:27:07 -08:00
Rafael Mendonça França
db6f69fd2a
Merge pull request #13884 from rafaelfranca/rm-travel-back
...
Add `travel_back` to remove stubs from `travel` and `travel_to` and remove auto-rollback after each test case
2014-01-30 04:19:00 -08:00
Rafael Mendonça França
fa1f20e654
Improve documentation [ci skip]
2014-01-30 10:17:48 -02:00
Rafael Mendonça França
7abb6e00c0
Remove automatic removal of Date/Time stubs after each test case
...
This behavior is only work out-of-box with minitest and also add a
downside to run after each test case, even if we don't used the travel
or travel_to methods
2014-01-30 10:17:48 -02:00
Rafael Mendonça França
6b16c27881
Add travel_back
to remove stubs from travel
and travel_to
2014-01-30 10:17:47 -02:00
Rafael Mendonça França
7f5466d582
Merge pull request #13878 from marcandre/leave_my_options_alone
...
find_in_batches should not mutate its argument
2014-01-30 04:10:48 -08:00
Yves Senn
02f9f33142
tidy CHANGELOGs [ci skip]
2014-01-30 11:12:46 +01:00
Yves Senn
9632c986b4
docs, references
is only used with includes
. Closes #13727 .
...
There is no gain in `referencing` tables that are not used for preloading.
Furthermore it will break if polymorphic associations are invloved. This
is because `references_eager_loaded_tables?` uses all `reference_values`
to decide wether to `eager_load` or `preload`.
2014-01-30 10:46:06 +01:00
Godfrey Chan
1917293dae
Merge pull request #13888 from rails/session-serializer
...
Modify the session serializer implementation
2014-01-30 00:24:28 -08:00
Guillermo Iguaran
fd487860db
Modify the session serializer implementation
...
Rename allowed options to :marshal and :json, for custom serializers
only allow the use of custom classes.
2014-01-30 01:53:19 -05:00
Marc-Andre Lafortune
642106e277
find_in_batches should not mutate its argument
2014-01-29 23:52:41 -05:00
Rafael Mendonça França
db5d6bf74f
Merge pull request #13883 from rafaelfranca/rm-time-travel
...
Alternative implementation to make time travel not dependent on mocha
2014-01-29 16:00:25 -08:00
Rafael Mendonça França
06e06cd454
Use each_value
2014-01-29 21:24:36 -02:00
Rafael Mendonça França
17cb1266c7
Store the singleton_class in a local variable
2014-01-29 21:24:34 -02:00
Rafael Mendonça França
7cf9a1c6a6
Change the class and method visibility
2014-01-29 21:24:03 -02:00
Rafael Mendonça França
6dce4367c2
Use instance method instead of before hook
2014-01-29 21:23:14 -02:00
Rafael Mendonça França
049a10d405
Alias the original method first to avoid warnings
2014-01-29 21:23:14 -02:00
Rafael Mendonça França
b2bb1aaf66
Implement a simple stub feature to use in the Time travel helpers
2014-01-29 21:23:14 -02:00