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: joshpeek.com/svn/plugins/dynamic_scope -- Posted via ruby-forum.com.
Maybe Matching Threads
- meantime_filter won''t pick up my missing methods
- with_scope issue
- [Dovecot v2.3.9.3] HTTP API Endpoint for mailbox cryptokey operations
- Rails Plugin: meantime_filter for controllers (actions within blocks)
- how to select with a kind of through relation(has_one)