Created
August 23, 2011 02:56
-
-
Save pitluga/1164228 to your computer and use it in GitHub Desktop.
simple validation
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
def validate(params_hash) | |
errors = {} | |
errors[:model] = "is required" if params_hash[:model].nil? | |
errors[:pk] = "is required" if params_hash[:pk].nil? | |
errors | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment