public
Description: brendan's ENhancements To Rails
Home | Edit | New

Home

Entrails: Enhancing the guts of Rails!

Try it out in your own Rails project:

$ cd path/to/your/rails/app/root $ git clone git://github.com/brendan/entrails.git vendor/plugins/entrails

ActiveRecord extensions

  • BetterConditions – Use symbolic expressions to enable logical combination of finder conditions
  • FindByAssociation – Reference association names directly in conditions hashes to perform queries of any depth/complexity without resorting to hard-coded sql partials.

ActionController extensions

  • NamedRouteParameter? – This is a hack to extract a routes name by embedding it in the parameters as params[:named_route]
  • TemplateForReferer? – Inspects the request.referer to determine if there is a matching template named for its named_route. This allows you to render response for actions differently depending on originating context (extra useful for rjs)
Last edited by brendan, Mon Sep 22 17:20:00 -0700 2008
Home | Edit | New
Versions: