Commit Graph

58893 Commits

Author SHA1 Message Date
Ryuta Kamizono
beb6b7add7 load_target is a public method
`send` is unnecessary.
2016-07-23 17:14:41 +09:00
Kasper Timm Hansen
1ca571cc47 Merge pull request #25908 from mechanicles/derives-from
Explain meaning of the code very well and Remove confusion. [ci skip]
2016-07-23 07:48:17 +02:00
Santosh Wadghule
8ad6260538 Explain meaning of the code very well and Remove confusion. [ci skip]
Code like `render(topics) => render("topics/topic")` adds confusion
for the readers. On first impression, that code feels like hash kind
of data, but it's not. So make it more clear and meaningful.
2016-07-23 09:56:35 +05:30
Rafael França
0020f1a4c9 Merge pull request #25914 from jmccartie/jm/not_in
Adds `not_in?` onto Object
2016-07-22 19:48:46 -03:00
Xavier Noria
92c60f87a6 revises a regexp
The exclamation mark is not a metacharacter.
2016-07-22 23:20:25 +02:00
Xavier Noria
cfc91c31aa systematic revision of =~ usage in AS
Where appropriate prefer the more concise Regexp#match?, String#include?,
String#start_with?, and String#end_with?
2016-07-22 23:13:49 +02:00
Xavier Noria
aea0e5cd70 adds require for Regexp#match? 2016-07-22 00:33:02 +02:00
Xavier Noria
21c6f810ac revises style 2016-07-22 00:31:09 +02:00
Xavier Noria
9256bbbbd7 the infamous typo only seen in GitHub's diff [ci skip] 2016-07-22 00:27:39 +02:00
Jon McCartie
4db6ac29f2 Adds not_in? onto Object 2016-07-21 17:23:33 -05:00
Xavier Noria
929a650080 performance boost for String#blank? in Ruby 2.4
Some casual benchmarks showed a 2x factor.

All credit goes to @nurse.
2016-07-22 00:16:24 +02:00
Xavier Noria
575dbeeefc define Range#match? if Ruby < 2.4
See the rationale in the documentation included in this patch.

We are going to gradually introduce this predicate in the code base.
2016-07-22 00:15:52 +02:00
Bart de Water
d4ea18a8cb
Allow MessageEncryptor to take advantage of authenticated encryption modes
AEAD modes like `aes-256-gcm` provide both confidentiality and data authenticity, eliminating the need to use MessageVerifier to check if the encrypted data has been tampered with.

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-07-21 10:38:33 -07:00
Xavier Noria
d5f57dc227 Merge pull request #25911 from juno/fix-comment-indent
Fix incorrect indentation in method comment
2016-07-21 17:09:45 +02:00
Junya Ogura
60b6f546a6 Fix incorrect indentation in method comment [ci skip] 2016-07-21 23:42:45 +09:00
Xavier Noria
58283b5acd explain the meaning of some RuboCop config options [ci skip]
For consistency mainly.

Also, some have a name that could make the reader think they
enforce the opposite of what they do, because the default is
not visible there.
2016-07-21 13:52:30 +02:00
Yves Senn
0800e5dcad Merge pull request #25907 from gsamokovarov/lock-web-console-for-5.0
Enforce minimal web-console version for Rails 5
2016-07-21 09:54:28 +02:00
Genadi Samokovarov
e072db7737 Enforce minimal web-console version for Rails 5
I dropped the version constraint in web-console with the idea it will be
easier to upgrade the console between Rails releases. However, issues
like #25899 started popping up.

I'm reintroducing the constraint, but this time, I don't set an upper
limit to the major version. This will keep the web-console in a version
that always works for the current Rails version and can be easily
upgraded to the last one with `bundle update`.

We may need to backport this for Rails 5.0.1.

Fixes #25899.
2016-07-21 10:46:12 +03:00
Kasper Timm Hansen
cf5bc0dd53 Merge pull request #25616 from ignatiusreza/callable_cache_key
Bring back support for callable cache key when rendering collection
2016-07-21 08:59:41 +02:00
Ignatius Reza
714c763dad Bring back support for callable cache_key on collection rendering 2016-07-21 08:42:56 +09:00
Rafael França
b334c19c07 Merge pull request #25902 from etiennebarrie/remove-tabs-before-commands
Remove tab chars before commands to be run
2016-07-20 18:46:58 -03:00
Étienne Barrié
34672e669d Remove tab chars before commands to be run 2016-07-20 17:01:28 -04:00
Rafael França
f88495d519 Merge pull request #25885 from kamipo/fix_explain_logging_with_binds
Fix explain logging with binds
2016-07-20 12:58:42 -03:00
Rafael França
b1d48d5424 Merge pull request #25786 from kamipo/add_exists_and_update_all_to_collection_proxy
Add `exists?` and `update_all` to `CollectionProxy` for respects an association scope
2016-07-20 12:56:57 -03:00
Rafael França
5757b9dbe7 Merge pull request #25897 from yahonda/remove_set_date_columns_and_modify_attributes_test
Remove Oracle specific tests based on deprecated behaviors
2016-07-20 12:48:18 -03:00
Yasuo Honda
cc4abed844 Oracle TIMESTAMP sql type is associated with Rails DateTime type now
- Refer https://github.com/rsim/oracle-enhanced/pull/845
Remove `set_date_columns` which has been deprecated in Oracle enhanced adapter
 - Refer https://github.com/rsim/oracle-enhanced/pull/869
2016-07-20 13:10:55 +00:00
Ryuta Kamizono
7d1dc9841c Fix explain logging with binds
`binds` is an array of a query attribute since Active Record 5.0.
2016-07-20 15:26:39 +09:00
Ryuta Kamizono
1a10d38d46 Add exists? and update_all to CollectionProxy for respects an association scope
Fixes #25732.
2016-07-20 14:58:33 +09:00
Rafael Mendonça França
a8a3a8cc69
Merge pull request #25438 from prathamesh-sonpatki/rm-session-store-initializer
Setup default session store internally, no longer through an initializer
2016-07-20 02:32:37 -03:00
Rafael França
f980dee24e Merge pull request #25578 from kamipo/move_warning_about_composite_primary_key_to_attribute_methods_primary_key
Move the warning about composite primary key to `AttributeMethods::PrimaryKey`
2016-07-20 02:23:00 -03:00
Rafael França
b8d7bcf93e Merge pull request #25520 from st0012/fix-current-page
Fix ActionView::Helpers#current_page? with trailing space issue.
2016-07-20 02:18:32 -03:00
Rafael França
c9061254de Merge pull request #25889 from kamipo/do_not_dup_binds_in_to_sql
Do not `binds.dup` in `connection#to_sql`
2016-07-20 02:16:38 -03:00
Rafael França
0d42c906c5 Merge pull request #25888 from kamipo/use_conn_to_sql_for_construct_sql
Use `connection#to_sql` for construct an SQL
2016-07-20 02:15:03 -03:00
Rafael França
0e825917f1 Merge pull request #25823 from mechanicles/missing-memory-store-tests
Add missing tests for memory store of cache.
2016-07-20 02:12:01 -03:00
Rafael Mendonça França
9c6f348d79
Merge pull request #25849 from suginoy/fix_merge_in_scope
Fix the calling `merge` method at first in a scope
2016-07-20 02:11:17 -03:00
Rafael França
b25e18007b Merge pull request #25828 from bogdanvlviv/ref_default_sequence_name
Refactored method `ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements#default_sequence_name`. Refactored test `HasManyAssociationsTest#test_do_not_call_callbacks_for_delete_all`.
2016-07-20 02:03:53 -03:00
Rafael França
cc22c9eae3 Merge pull request #25393 from gsamokovarov/introduce-assert-changes
Introduce `assert_changes` and `assert_no_changes`
2016-07-20 00:57:25 -03:00
Rafael França
e2b71e9f8e Merge pull request #25834 from alpaca-tc/fixes_multiparameter_attributes_on_time_with_time_zone_aware_attributes
Fix bug in method AR TimeZoneConverter#set_time_zone_without_conversion
2016-07-20 00:53:30 -03:00
Rafael França
8a0b3ca8c4 Merge pull request #25822 from mechanicles/clear-local-cache-on-invalid-parameters-error
Add missing test for clearing up local cache on invalid parameters error.
2016-07-20 00:52:55 -03:00
Rafael França
b72674098b Merge pull request #25869 from kamipo/specificiation_id_was_renamed_to_spec_name
`specificiation_id` was renamed to `spec_name`
2016-07-20 00:51:38 -03:00
Rafael França
82b04fc609 Merge pull request #25868 from kamipo/fix_payload_class_name_to_spec_name
Fix `payload[:class_name]` to `payload[:spec_name]`
2016-07-20 00:51:10 -03:00
Rafael Mendonça França
0f96d01758
Add a new rule to rubocop 2016-07-20 00:35:11 -03:00
Stan Lo
ef89331f0a Fix ActionView::Helpers#current_page? with issue in https://github.com/rails/rails/issues/19472 2016-07-20 10:57:26 +08:00
alpaca-tc
780535017a Fixes multiparameter attributes conversion with time_zone_aware_attributes and invalid params 2016-07-19 22:35:45 +09:00
Ryuta Kamizono
4ef4d46d0c Do not binds.dup in connection#to_sql
Because `connection#to_sql` does not mutate `binds`.
2016-07-19 20:31:33 +09:00
Ryuta Kamizono
3befc7a9ef Use connection#to_sql for construct an SQL 2016-07-19 20:06:58 +09:00
Matthew Draper
d8bc0964d2 Merge pull request #25780 from Ropeney/patch-1
Update ActionCable Rebroadcasting a Message documentation
2016-07-19 16:47:08 +09:30
Xavier Noria
b770f3c474 Merge pull request #25886 from kamipo/pass_type_casted_binds_to_log_subscriber
Pass `type_casted_binds` to log subscriber for logging bind values properly
2016-07-19 08:56:15 +02:00
Ryuta Kamizono
f814585bb2 Pass type_casted_binds to log subscriber for logging bind values properly
Address to 5a302bf553 (commitcomment-18288388).
2016-07-19 14:11:58 +09:00
suginoy
cf2574b1c9 Fix the calling merge method at first in a scope
Changing the order of method chaining `merge` and other query
method such as `joins` should produce the same result.

```ruby
class Topic < ApplicationRecord
  scope :safe_chaininig,   -> { joins(:comments).merge(Comment.newest) }
  scope :unsafe_chaininig, -> { merge(Comment.newest).joins(:comments) } #=> NoMethodError
end
```
2016-07-19 10:19:59 +09:00