Created
December 27, 2010 17:04
-
-
Save qrush/756299 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%w[address_1 city state zip_code].each do |attr| | |
validates_presence_of attr, unless: ->(org) { org.send(attr).nil? } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This may have been removed in Rails 3, but in 2.3 I would have done this as