Genadi Samokovarov
2efc64c1bc
Remove falsy deprecation note in AS guides [ci skip]
...
This is no longer true as @jeremy removed the deprecation in 7a5601c.
2014-05-13 21:16:10 +03:00
Andrew White
977d36af8f
Merge pull request #15091 from printercu/patch-5
...
Do not check defined?(CGI) on every call #to_query
2014-05-13 17:42:30 +01:00
Carlos Antonio da Silva
c4c5801bd9
Fix assertion order and ✂️ extra spaces
2014-05-13 12:09:11 -03:00
Aaron Patterson
f0f7c4ff96
Merge pull request #15068 from josepjaume/patch-1
...
Dup options hash to prevent modifications
2014-05-13 08:04:24 -07:00
Yves Senn
6470f374c9
pg, clarify default behavior for composite types.
...
* by default composite types are mapped as `OID::Identity` and issue a warning
* the user is advised to register his own `OID::Type` to make use of composite types
Registering a new `OID::Type` does currently not allow to specify the type casting
behavior when writing to the database. In order for it to work we need to use the
values within `@attributes`. They are already being type casted and are ready to be
written to the DB.
See 57643c961f/activerecord/lib/active_record/attribute_methods.rb (L460-L462)
2014-05-13 16:51:04 +02:00
Yves Senn
15285f2248
extract pg type map initialization process to TypeMapInitializer
.
2014-05-13 16:51:04 +02:00
printercu
f1798951e7
Do not check defined?(CGI) on every call #to_query
2014-05-13 17:27:43 +04:00
Carlos Antonio da Silva
c6c1642383
Get rid of unused method
...
It's usage has been removed in 325c9d5e5235db4b5210d9db6c863835d1ac7eed.
2014-05-13 09:49:00 -03:00
Josep Jaume Rey
6caf3ab51b
Dup options hash to prevent modifications
...
`options[:default]` and `options[:raise]` can be mistakenly added to the `options` hash. This can be a problem if you're reusing the same object.
2014-05-13 14:13:36 +02:00
Carlos Antonio da Silva
e2ae787b36
Simplify merge call on polymorphic helpers
2014-05-13 08:18:07 -03:00
Yves Senn
0b2eee453c
test, move all pg array tests into postgresql/array_test.rb
.
2014-05-13 12:05:11 +02:00
Andrew White
b95ac8a20b
Merge pull request #15084 from arthurnn/fix_assert_redirected_to
...
Fix regression on `assert_redirected_to`.
2014-05-13 10:52:40 +01:00
Yves Senn
fd6d6dc602
Merge pull request #15083 from zuhao/refactor_actionmailer_i18n_with_controller_test
...
Use with_translation helper to clean up I18n stored translations.
2014-05-13 10:43:50 +02:00
Zuhao Wan
32ef7d3c5c
Use with_translation helper to clean up I18n stored translations.
2014-05-13 16:38:21 +08:00
Yves Senn
9392d1615c
Merge pull request #15082 from zuhao/refactor_actionmailer_delivery_methods_test
...
Clean up deliveries after each test.
2014-05-13 10:32:37 +02:00
Zuhao Wan
5330b894e5
Move state restoration from setup/teardown into affected test cases.
2014-05-13 16:28:39 +08:00
Yves Senn
b6d627b49a
Merge pull request #15086 from zuhao/refactor_actionmailer_mail_layout_test
...
Do not clear deliveries in setup.
2014-05-13 09:39:13 +02:00
Yves Senn
ef8ac1f885
docs, explain usage of count
+ select
. Closes #15065 . [ci skip]
2014-05-13 09:04:52 +02:00
Zuhao Wan
4d9e4ea47a
Remove unnecessary setup and teardown.
2014-05-13 15:03:53 +08:00
Yves Senn
55b1f21ae3
Merge pull request #15085 from zuhao/refactor_actionmailer_log_subscriber_test
...
A minor stylistic fix and cleanup of mail deliveries.
2014-05-13 08:21:13 +02:00
Zuhao Wan
275d20ca01
A minor stylistic fix and cleanup of mail deliveries.
2014-05-13 13:01:14 +08:00
Arthur Neves
7ec665303d
Fix regression on assert_redirected_to
.
...
`assert_redirected_to` would fail if there is no controller set on
a `ActionDispatch::IntegrationTest`, as _compute_redirect_to_location
would be called on the controller to build the url.
This regression was introduced after 1dacfbabf3bb1e0a9057dd2a016b1804e7fa38c0.
[fixes #14691 ]
2014-05-13 00:03:38 -04:00
Aaron Patterson
84908bbde9
fix bad merge
2014-05-12 18:08:41 -07:00
Aaron Patterson
325c9d5e52
avoid array allocation when extracting usernames and passwords
2014-05-12 17:59:44 -07:00
Rafael Mendonça França
890a189bb4
Ok. Enough models for today 😡
2014-05-12 21:28:39 -03:00
Rafael Mendonça França
290b2795c5
Test with ruby-head to make @tenderlove happy
2014-05-12 21:16:22 -03:00
Rafael Mendonça França
392e627b12
This is also a model
2014-05-12 21:03:58 -03:00
Rafael Mendonça França
be6ff39199
This model is a model so it should behaves like one
2014-05-12 20:54:06 -03:00
Rafael Mendonça França
c24c9def36
Merge pull request #15080 from eileencodes/flip-unless-else-conditional-in-halting-method
...
flip conditional to use if/else instead of unless/else
2014-05-12 20:34:10 -03:00
eileencodes
dce2385095
flip conditional to use if/else instead of unless/else
...
Use if/else instead of unless/else so conditional reads better.
2014-05-12 19:29:14 -04:00
Aaron Patterson
3ccd24a33f
Revert "reduce conditionals in url_for"
...
This reverts commit 9df60693d77813b362fb528fc62381ac8f1eec12.
2014-05-12 16:20:52 -07:00
Aaron Patterson
547881594b
😢 🔫 use an empty hash for magical speed.
...
For some reason, if the hash is empty, we choose "optimized" routes. I
am not sure how or why optimized routes differ from regular routes.
But, if we make sure the hash is empty, we get a nice speed improvement.
2014-05-12 16:16:06 -07:00
Aaron Patterson
3d9bd2ac94
this class is a model, so it should act like one
2014-05-12 15:54:46 -07:00
Aaron Patterson
cfdda38088
use the helper method builder to construct helper methods
2014-05-12 15:54:45 -07:00
Aaron Patterson
9656640080
probably should not check in a raise
2014-05-12 15:54:45 -07:00
Aaron Patterson
74a6ad2c6b
undo optimized calls until the builder object is finished
2014-05-12 15:54:45 -07:00
Aaron Patterson
56ff626560
remove suffix from the handler methods
2014-05-12 15:54:45 -07:00
Aaron Patterson
cc1ff82df4
push list handling to the builder object
2014-05-12 15:54:45 -07:00
Aaron Patterson
3095f5ba38
push string handling to the builder object
2014-05-12 15:54:45 -07:00
Aaron Patterson
e14ec1266c
push model and class handling to a helper builder object
2014-05-12 15:54:45 -07:00
Aaron Patterson
6634e9c8c5
adding a method to handle strings using the same api
2014-05-12 15:54:45 -07:00
Aaron Patterson
89e0718188
fix url_for with classes
2014-05-12 15:54:44 -07:00
Aaron Patterson
4b8ab797b4
break each polymorphic type to it's own method
2014-05-12 15:54:44 -07:00
Aaron Patterson
e8210450ad
remove dead code
2014-05-12 15:54:44 -07:00
Aaron Patterson
34b2ded2ff
only test persisted?
on the record once
...
also avoid the case of calling `persisted?` on something that doesn't
respond to it
2014-05-12 15:54:44 -07:00
Aaron Patterson
a572a0e754
only send options if there are any options
2014-05-12 15:54:44 -07:00
Aaron Patterson
b451648e1f
add a test for the parameters sent to the url helper for new records
2014-05-12 15:54:44 -07:00
Aaron Patterson
d94cd869c8
remove should_pop variable
2014-05-12 15:54:44 -07:00
Aaron Patterson
ad31afe63c
only pop records when we get an array
2014-05-12 15:54:43 -07:00
Coraline Ada Ehmke + Aaron Patterson
a20cd88463
remove unnecessary array allocations
2014-05-12 15:54:43 -07:00