This file contains hidden or 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
| git clone <repositry_url> | |
| git pull | |
| git branch -l | |
| git checkout -f | |
| git reset --hard HEAD | |
| git add . | |
| git rm <file_name> | |
| git commit -m "messages" |
This file contains hidden or 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
| # http://edgeguides.rubyonrails.org/active_record_validations.html#performing-custom-validations | |
| # First Example - custom validator without options | |
| =================================================== | |
| class CustomValidator < ActiveModel::Validator | |
| def validate_each(record, attribute, value) | |
| if validation_failed | |
| record.errors[attribute] << "must have something todo with this value" | |
| end | |
| end |