validationを設定してユーザーの入力をチェックするようにします。リポジトリはこちらです。 https://github.com/mogurastore/instagram_rails
http://www.nicovideo.jp/watch/sm37292053