2006-04-22から1日間の記事一覧

RadRailsに既存プロジェクトをインポート

From a project on your filesystem How do you get a Rails application you've already started into RadRails ? * Create a new Rails project, but uncheck the "Create Rails application skeleton" box * Right-click on the project and hit Import->…

Rubyってすげい

def getUser( typeId ) result = users.find( :first, :conditions => ["type_id = ?", typeId] ) if result == nil result = User.new() result.type_id = typeId end return result endUserというモデルのデータがDBに存在しなかったら作っちまえ、という…

Rails 1.1ってすげい

全てのオブジェクトに、to_jsonメソッドを追加。JSON形式 への変換される。 まだ本を読んでいる最中なので1.0のこともわかってないけど、1.1はRJS(Ruby JavaScript)テンプレートっていうのが追加されたらしい。なんか便利そう。

RadRailsでTestが動かない

C:/dev/ruby.org/radrails-0.6.2/plugins/org.rubypeople.rdt.testunit_0.8.0.604092300RC1/ruby/RemoteTestRunner.rb:254:in `slice': no implicit conversion from nil to integer (TypeError) from C:/dev/ruby.org/radrails-0.6.2/plugins/org.rubypeopl…