1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record
Carlos Antonio da Silva 8d02afeaee Rollback where.like and where.not_like
The real win with these chain methods is where.not, that takes care of
different scenarios in a graceful way, for instance when the given value
is nil.

    where("author.id != ?", author_to_ignore.id)
    where.not("author.id", author_to_ignore.id)

Both where.like and where.not_like compared to the SQL versions doesn't
seem to give us that much:

    Post.where("title LIKE 'ruby on%'")
    Post.where.like(title: 'ruby on%'")
    Post.where("title NOT LIKE 'ruby on%'")
    Post.where.not_like(title: 'ruby on%'")

Thus Rails is adding where.not, but not where.like/not_like and others.
2012-12-07 16:52:55 -02:00
..
associations Replace comments' non-breaking spaces with spaces 2012-12-04 22:11:54 -08:00
attribute_methods Don't call will_change! for datetime nil->"". 2012-11-25 11:24:27 +00:00
coders fix AR::Coders::YAMLColumn nodoc [ci skip] 2012-09-21 22:48:33 -05:00
connection_adapters revises a RDoc example to make it idiomatic 2012-12-07 17:37:57 +01:00
fixture_set Move/rename files to follow naming conventions 2012-10-07 20:43:18 +02:00
locale Changed scope for "taken" error message translation to decrease precedence 2012-10-19 17:36:34 -07:00
locking 1.9 Syntax related changes 2012-11-10 17:16:21 +02:00
migration Coerce strings in create_join_table. 2012-11-21 13:21:18 -06:00
railties Don't use test environment by default when running rake db:structure:load; #7951 2012-10-18 11:03:14 +02:00
relation Rollback where.like and where.not_like 2012-12-07 16:52:55 -02:00
scoping Replace comments' non-breaking spaces with spaces 2012-12-04 22:11:54 -08:00
serializers 1.9 Syntax related changes 2012-11-10 17:16:21 +02:00
tasks Correct default charset/collation for mysql dbs 2012-09-21 12:03:16 -07:00
validations Fix bug with presence validation of associations. 2012-10-16 19:04:40 -07:00
aggregations.rb 1.9 hash syntax changes 2012-11-08 23:16:54 +02:00
associations.rb Deprecate Relation#sum with a block. 2012-11-21 22:21:01 -02:00
attribute_assignment.rb Typecast to string and array are not supported in multiparameter 2012-10-18 00:31:05 -03:00
attribute_methods.rb Keep the code related to serialization in Serialization module. 2012-11-10 01:45:43 +04:00
autosave_association.rb Cleans and removes 'Examples' tag [ci skip] 2012-12-01 15:35:04 -05:00
base.rb Added STI support to init and building associations 2012-11-29 05:50:34 +00:00
callbacks.rb 1.9 hash syntax changes 2012-11-08 23:16:54 +02:00
connection_handling.rb 1.9 hash syntax changes 2012-11-08 23:16:54 +02:00
core.rb Don't allocate new strings in compiled attribute methods 2012-11-21 21:59:09 +00:00
counter_cache.rb grammar improvements for increment_counter and decrement_counter docs 2012-12-02 19:40:31 -08:00
dynamic_matchers.rb Renaming active_record_deprecated_finders to activerecord-deprecated_finders 2012-08-17 10:21:52 +01:00
errors.rb Revert "Add documentation to TransactionIsolationError [ci skip]" 2012-12-04 21:56:21 +05:30
explain.rb Don't run explain on slow queries for database adapters that don't support it 2012-11-26 09:36:04 -06:00
explain_subscriber.rb Don't explain except normal CRUD sql. 2012-09-17 00:22:34 +09:00
fixtures.rb Remove useless check of AR being defined from teardown fixtures 2012-11-27 00:19:26 -02:00
inheritance.rb Move instantiation responsibilities from Inheritance to Persistence. Have Inheritance#discriminate_class_for_record handle STI lookup duties. 2012-11-29 08:56:09 -07:00
integration.rb Cleans and removes 'Examples' tag [ci skip] 2012-12-01 15:35:04 -05:00
log_subscriber.rb Revert "Remove trailing whitespaces" 2012-12-01 13:22:49 -05:00
migration.rb Add metadata to schema_migrations 2012-12-01 19:41:09 -08:00
model_schema.rb 1.9 Syntax related changes 2012-11-10 17:16:21 +02:00
nested_attributes.rb 1.9 Syntax related changes 2012-11-10 17:16:21 +02:00
null_relation.rb Delegate all calculations to the scope. 2012-11-09 12:09:37 +00:00
persistence.rb Unscope update_column(s) query to ignore default scope 2012-12-06 23:17:56 -02:00
query_cache.rb Fix typo. 2012-12-03 12:37:45 +08:00
querying.rb Cleans and removes 'Examples' tag [ci skip] 2012-12-01 15:35:04 -05:00
railtie.rb Fix typo in the Observers deprecation message. [ci skip] 2012-11-28 23:08:41 -02:00
readonly_attributes.rb Make caller attribute in deprecation methods optional 2012-10-30 10:23:41 +08:00
reflection.rb Added STI support to init and building associations 2012-11-29 05:50:34 +00:00
relation.rb Remove observers and sweepers 2012-11-28 22:46:49 -02:00
result.rb Remove ActiveRecord::Model 2012-10-26 15:51:02 +01:00
sanitization.rb 1.9 Syntax related changes 2012-11-10 17:16:21 +02:00
schema.rb Merge branch 'joshsusser-master' into merge 2012-12-05 12:13:49 -08:00
schema_dumper.rb dump schema.rb without :version option 2012-12-05 14:33:49 -08:00
schema_migration.rb Oracle needs table to check index existence 2012-12-06 09:38:32 -08:00
scoping.rb load active_support/concern in active_support/rails 2012-08-02 21:59:23 +02:00
serialization.rb include_root_in_json allows inheritance. 2012-10-31 00:08:36 +09:00
store.rb refactor store_accessor 2012-09-13 10:12:11 -04:00
test_case.rb load active_support/deprecation in active_support/rails 2012-08-02 21:59:23 +02:00
timestamp.rb Remove not used load hooks for active_record_config 2012-11-09 12:45:50 -02:00
transactions.rb 1.9 Syntax related changes 2012-11-10 17:16:21 +02:00
translation.rb
validations.rb Fix syntax error with no US-ASCII char 2012-09-28 15:26:33 -03:00
version.rb