Dynamic Finders With Belongs To Names plugin

Plugin details

This patch enhances dynamic finders to allow use of a belongs_to association
name instead of having to use the foreign key attribute directly.

Websitehttp://blog.hasmanythrough.com/2006/07/02/patch-test-plugin-dynamic-finders-with-belongs_to-names Repositoryhttp://svn.hasmanythrough.com/public/plugins/dynamic_finders_with_belongs_to_names/ Author Josh Susser Tags association LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://svn.hasmanythrough.com/public/plugins/dynamic_finders_with_belongs_to_names/

For example, these two lines are equivalent:

  posts = Post.find_all_by_author_id(author.id)
  posts = Post.find_all_by_author(author)

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 7 months ago