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
<?php | |
/** | |
* Place this file in CakePHP's root dir and do: | |
* $ php -S localhost:8080 builtin-server.php | |
* with PHP5.4 | |
*/ | |
if (strpos($_SERVER['REQUEST_URI'], '?')) { | |
list($path, $param) = preg_split('/\?/', $_SERVER['REQUEST_URI'], 2); | |
} else { | |
$path = $_SERVER['REQUEST_URI']; |
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
class User < ActiveRecord::Base | |
validates :email, | |
presence: true, | |
format: { with: VALID_EMAIL_REGEX }, | |
uniqueness: { case_sensitive: false } | |
end |