If you are using ActiveSupport >= 4.0, Object#try will return nil if the object does not respond to the method. As mentioned in the Rails 4 release notes.
Object#try will now return nil instead of raise a NoMethodError if the receiving object does not implement the method, but you can still get the old behavior by using the new Object#try!.
So, you could do what you want with unless foo.try(:bar). Maybe not useful in this case if you're not using ActiveSupport, but others who find this page might be interested to know this.