Skip to content

Instantly share code, notes, and snippets.

@tjh
Forked from MettaAudio/Return_true.rb
Created December 21, 2010 21:55
Show Gist options
  • Save tjh/750685 to your computer and use it in GitHub Desktop.
Save tjh/750685 to your computer and use it in GitHub Desktop.
Order.class_eval do
def has_site_approvals?
line_items.each do |item|
return true if item.approval && item.approval.approved?
end
false
end
end
Approval.class_eval do
def approved?
approval_date.present?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment