rails

Rails の select() 系ヘルパーはイケてないと声を大にして言いたい

背景 いつも思うが、Rails の select() 系ヘルパーメソッドってわかりにくい。 初心者泣かせ。 具体例(1) 参考文献: マニュアルselect() の例: ### eRuby <%= select("post", "person_id", Person.all.collect {|p| [ p.name, p.id ] }, { :include_blank =>…

Rails の routes.rb がわかりにくい

Rails の routes.rb と格闘中なんだけど、なんで Rails の routing はこんなにわかりにくいのだろうか。 ## named route は省略 map.with_options(:controller=>'books') do |x| x.connect '/books', :action=>'index', :conditions=>{:method=>:get} x.conn…

速報: Merb と Rails が統合

悪い冗談としか思えないんだけど、Merb と Rails が統合されるらしい。 Merb gets merged into Rails 3! by DHH (Rails 作者) Rails And Merb Merge by Yehuda Katz (Merb 主任開発者) Rails and Merb core team working together on their next release by …

named_scope が Rails 1.2.6 と 2.0.4 に back port されたらしい

RubyFlowより。 Ruby on Rails の named scope は、O/R マッパーの使い勝手を大きく改善するが、これは Rails 2.1 からの新機能であり、古い Rails では動かない。 しかし、これを古い Rails に移植したツワモノがいるそうだ。 NamedScope For Those Left Be…

Rails 2.1 の新機能

RubyFlowで紹介されていた、Rail Spikes: Rails gets more matureの翻訳。誤訳の指摘はコメントで。Posted by Luke on Friday, May 02 Rails 2.1 is right around the corner. I've been following the new features in Edge Rails and eagerly looking forw…

mod_rails と mongrel のベンチマーク

via RubyFlowmod_rails と mongrel とを比較したベンチマークが公開されてる。 これによると、mod_railsのほうが 1 割ほど速いようです。またディレクティブ RailsMaxPoolSize 3 を指定して Rails インスタンス数を調整してやると、さらに速くなるみたい。

Agile Web Development with Rails 第 3 版のβ版が公開

via RubyFlow[ruby-talk:299338] [ADV] Announcing the beta of Agile Web Development with Rails, Third EditionAgile Web Development with Rails 第 3 版のβ版が pdf で公開された。お値段は 24 ドル。さくっと買ってみた。これから読む。

Rails のソースコード行数を数えてみた

Struts の行数が約 30 万行、Click の行数が約 3 万行というのは以前調べた通り。そこで、Rails の行数も調べてみた。Rails のコードがわからなくて腹立ったからというのは内緒。 lines words chars ------------------------------------------------- acti…