This can be one if statement:

<code> if options[:company] && option[:company].id == self.id</code>