2007-12-08から1日間の記事一覧

Rails2.0 ビュー

ruby script/generate controllerでコントローラと一緒にビューを作ったら index.html.erbも作られました。試しにrhtmlも作ってみたら、ちゃんと動きました。共存してもOK。

Rails2.0 マイグレーション

def self.up create_table :events do |t| t.timestamps end endマイグレーションを生成してみたらこんなになっていた。tmiestampsってだいたい見当はつくけど、一応ActiveRecord::ConnectionAdapters::TableDefinitionを確認。 def timestamps column(:crea…

Rails2.0 rakeタスク

Rails 2.0 is finally finished after about a year in the making. 2.0が出たってことで色々試そうと思ってます。まずはざっくりrakeタスクの違いを見てみました。 rake db:abort_if_pending_migrations # Raises an error if there are pending migrations…

Rails2.0 config.breakpoint_server

******************************************************************* * config.breakpoint_server has been deprecated and has no effect. * *******************************************************************サーバーを起動すると、こんなメッセー…

Rails2.0 pagination

So how do I upgrade?If you want to move your application to Rails 2.0, you should first move it to Rails 1.2.6. That’ll include deprecation warnings for most everything we yanked out in 2.0. So if your application runs fine on 1.2.6 with n…