saveメソッドを呼び出してモデルのデータを保存するときに、状況によって実行するバリデーションを切り替えたい場合がある。 そんな時は、validatesメソッドのonオプションが使える。 例えば、
WinユーザがRailsアプリをこれから公開しようと思った場合 Windowsで学習を開始するのは不可能なのでLinuxをいれる でもWindowsで進めようとしてmsysGitをいれたりするが結局半日無駄にする なぜかgemが最新じゃないと怒られる gemを単純に使っても後から困るのでrvmかrbenvが必要。使い方覚えないといけない やっとRails3.2導入。javascriptエンジンが入ってないので起動しない やっと起動 HTML書いてるのは情弱だけ => hamlを覚える js書いてるのは情弱だけ => coffee scriptを覚える css書いてるのは情弱だけ => scssを覚える テスト書いてないコードはレガシーコードっていわれる しかたないのでRspecいれる => Rspec覚える ユニットテストだけではしかたないといわれcapybaraもいれる => capyb
更新: 2011年7月9日23時0分頃 とあるシステムで徳丸本のストレッチングを採用することにしたという話がありましたが、その実装が佳境に入ってきました。私は指示だけ出して、実装はお任せ……と思っていたのですが、基本的な部分を作ってもらったところでバトンタッチされ、私が引き継ぐ形で実際にコードを書くことになりました。 基本的には徳丸本 (www.amazon.co.jp)のオススメどおりの実装にするという方針なのですが、実際にコードを書いてみると、いろいろと気になったり迷ったりした事も出てきました。そのあたりを簡単にメモしておきます。 ※ちなみに、このシステムはRuby1.9.2 + Ruby on Rails3での実装なので、PHPのコードサンプルをそのまま使っているわけではありません。 ストレッチ回数をどう決めるのか徳丸本327ページにあるコード例を参考にして実装。アプリケーションごと
イタリアのスーパーカーメーカーのパガーニ社が、ある人物の依頼で製作するワンオフモデル、『ゾンダHH』。この特別モデルをオーダーしたのが、30歳の有名プログラマーであることが判明した。 欧州メディアの報道によると、ゾンダHHを注文したのは、デンマーク出身のDavid Heinemeier Hansson氏(30歳)。画期的なウェブアプリケーションフレームワーク、『Ruby on Rails』(ルビー・オン・レールズ)の作者として知られる。 ゾンダHHは、メルセデスベンツの高性能車開発部門、AMG製の7.3リットルV12エンジンを搭載。最大出力678ps、最大トルク79.5kgmを発生する。車両重量は1210kgに抑えられ、0‐100km/h加速は3.4秒と世界最高峰の実力だ。 ちなみに、David Heinemeier Hansson氏は現在、米国シカゴに在住。ゾンダシリーズは米国への正規輸
Update 6: Some interesting changes from Twitter's Evan Weaver: everything in RAM now, database is a backup; peaks at 300 tweets/second; every tweet followed by average 126 people; vector cache of tweet IDs; row cache; fragment cache; page cache; keep separate caches; GC makes Ruby optimization resistant so went with Scala; Thrift and HTTP are used internally; 100s internal requests for every exter
Hi, I'm Mac もとい I'm Ruby on Rails で始まるコマーシャル。 よくできたパロディです。 Ruby on Rails vs Java -- ad #1 of 4 Ruby on Rails vs PHP - Migrations - ad #2 of 4 Ruby on Rails vs PHP - Organization - ad #3 of 4 Ruby on Rails vs PHP - Changing Database - ad #4 of 4 このなかで、最も共感したのは、三つ目の Ruby on Rails vs PHP - Organization - ad #3 of 4。 (フレームワークを使ってない場合に限り、そして他人が書いたコードの場合は特になのですが)ぐっちゃぐちゃでどこでどんな処理をしているのか見通しが非常につきにくいPHPに対し
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く