Skip to content

Instantly share code, notes, and snippets.

@dwaynemac
Created May 15, 2012 17:16
Show Gist options
  • Save dwaynemac/2703408 to your computer and use it in GitHub Desktop.
Save dwaynemac/2703408 to your computer and use it in GitHub Desktop.
class CommunicationSearch < Search
attr_accessor :full_name
def results(base = nil)
if self.full_name.present?
contacts = PadmaContact.paginate :where => { :full_name => self.full_name }, :per_page => 999999
base = base.where(:contact_id => contacts.map(&:id))
end
...
base
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment