Skip to content
brendan edited this page Sep 12, 2010 · 9 revisions

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)
Clone this wiki locally