Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10740 (new defect)

Opened 1 year ago

Last modified 9 months ago

[PATCH][DOCS] rdoc for find does not mention searching by :condition with array values

Reported by: aivanov Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords: docs
Cc:

Description

Documentation:

This is a possible (and useful) way to use find:

Model.find(:all, :conditions=>{:field => [x, y, z]})

which translates into an IN clause. However the documentation for find does not mention this, (but does mention the simple equality and BETWEEN-with-ranges usage).

Attachments

find_conditions_field_with_array_rdoc_patch.diff (1.2 kB) - added by kris_chambers on 01/10/08 02:28:06.

Change History

01/08/08 05:57:28 changed by aivanov

  • summary changed from Documentation: rdoc for find does not mention searching by :condition with array values to [DOCS] rdoc for find does not mention searching by :condition with array values.

01/08/08 07:11:54 changed by chuyeow

  • keywords set to docs.
  • version changed from 1.2.6 to edge.

Would you like to make a patch for this? :)

http://dev.rubyonrails.org/wiki has details on how if you don't know how (basically just svn diff > your_patch.diff after editing Rails).

01/10/08 02:28:06 changed by kris_chambers

  • attachment find_conditions_field_with_array_rdoc_patch.diff added.

01/10/08 02:29:07 changed by kris_chambers

  • summary changed from [DOCS] rdoc for find does not mention searching by :condition with array values to [PATCH][DOCS] rdoc for find does not mention searching by :condition with array values.

03/18/08 23:04:14 changed by jqr

+1 easy fix. I haven't tried to apply this to edge but it looks fine.