Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free! Click here to download the new Pastebin App for iOS.
Guest

Untitled

By: a guest on Feb 11th, 2012  |  syntax: None  |  size: 0.27 KB  |  hits: 45  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. def self.with_registrar_scope(rid)
  2.   with_scope(
  3.     :find => {:conditions => {:registrar_id => rid}},
  4.     :create => {:registrar_id => rid}
  5.   ) do
  6.     yield
  7.   end
  8. end
  9.  
  10. # plus court ?
  11.  
  12. named_scope :with_registrar, lambda {|rid| :conditions => { :registrar_id => rid } }