Plugins - Squirrel

StarAdd to favorites

Squirrel lets you specify query conditions in block form as a list of statements rather than the awkward hash normally provided to find. You can specify columns by simply stating them and comparing them to your parameters.

  Location.find(:all) do
      primary_address.zip == params[:zip]
      updated_at < 1.week.ago
  end

You can also group conditions for specifying OR or AND joins explicitly.

jyurek

http://giantrobots.thoughtbot.com/2007/1/12/squirrel-once-more-with-feeling

http://svn.thoughtbot.com/plugins/squirrel

Rails' (MIT)

  • Currently 4.2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Searching and Queries

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?