Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.   def validate_status_changes
  2.     return if changes.keys == ["status"]
  3.     return if changes["status"].present? && changes["status"].second == "open"
  4.     return if changes["status"].present? && changes["status"].first == "open"
  5.  
  6.     errors.add_to_base(:cant_update_locked_deliverable) if locked?
  7.     errors.add_to_base(:cant_update_closed_deliverable) if closed?
  8.   end