Adds dynamic methods to scope.
Examples
scope_posts_to_user { yield } #=>
Post.with_scope({
:find => { :conditions => [ ''user_id = ?'',
params[:user_id] ]},
:create => { :user_id => params[:user_id] }
}) { yield }
scope_messages_to_mailbox { yield } #=>
Message.with_scope({
:find => { :conditions => [ ''mailbox_id = ?'',
params[:mailbox_id]
]},
:create => { :mailbox_id => params[:mailbox_id] }
}) { yield }
SVN: http://joshpeek.com/svn/plugins/dynamic_scope/
--
Posted via http://www.ruby-forum.com/.