applying this change from wiki, thanks astronouth7303

This commit is contained in:
maxwell 2010-09-16 15:04:29 -07:00
parent b155d07abd
commit 2e8785b596

View file

@ -26,8 +26,8 @@ class Request
validates_presence_of :destination_url, :callback_url
before_validation :clean_link
scope :for_user, lambda{ |user| where(:destination_url => user.receive_url) }
scope :from_user, lambda{ |user| where(:destination_url.ne => user.receive_url) }
scope :for_user, lambda{ |user| where(:destination_url => user.person.receive_url) }
scope :from_user, lambda{ |user| where(:destination_url.ne => user.person.receive_url) }
def self.instantiate(options = {})
person = options[:from]