acts_as_taggable_on_steroids の tag_cloud

#controller
        @tag_clouds = Tagging.find(:all, 
                                                           :select => "distinct(tag_id), count(tag_id) as tag_count", 
                                                           :group  => "tag_id", 
                                                           :order => "tag_count desc", 
                                                           :limit => 100)
#view
<% @tag_clouds.each do |tagc| %>
<div class="<%= %|tag_#{tagc.count > 10  ?  10 : 5 }| %>"><%= link_to tagc.tag.name, :id => tagc.tag.name %></div>
<% end %>

...んもー

とりあえずpopularity調べたいだけの様なので

#controller
        @tag_clouds     = Tagging.count(:group => "name", :include => :tag, :order => "count_all DESC", :limit => 100)
#view
<% @tag_clouds.each do |tag| %>
<%= %|<div class=" #{%|tag_#{tag[1] > 10  ?  10 : 5 }">#{link_to tag[0], :id => tag[0]}</div>| %>
<% end %>

ちょっとスッキリ

Rubber, Meet Road: Getting Designers Running with Rails Amy Hoy

http://slash7.com/ の人
デザイナとrailsエンジニアとのコラボレーションの方法と
サイト制作時のワークフローに関して
テンプレートもデザイナで作成する。
erbは直感的なので分かりやすいし Macを使っているのでrailsも動くし環境を作るのは簡単
ajaxのデザインはワークフローを作るときにしっかり内容を作り込んで有ればわりと簡単にテンプレート化できる。

あとで書く

Full-stack Web app testing with Selenium and Rails

Alex Chafee, Brian Takita
selenium on rails

do the `$ rake test:selenium`

tableレイアウトを使っているサイトで、css3セレクタつかったり、selenium用にhtmlテンプレートを用意してテストするのも良いけどあんまり実用的ではない。
そのくらいであればテーブルを書き直した方が良い
ブラウザのレンダリング結果をproxyに戻すのがミソで戻したレンダリング結果に対してテストを行うので実行結果のテストもきっちり出来て安心
テストコードにブラウザのレンダリング結果を元にしたテストが行えるのでajaxのdebugにも持ってこい
selenium test -> unit testの順で行うようにしている
intel macminiを一個用意して、win/unix/macのテスト環境を作って自動テストしているyo! ちっさいしパフォーマンスも十分という事

ビアパーティでラップトップ持ってきて質問しても良いけどラップトップ無くしちゃうよ(w
とのこと

  • -

Pivotal Labs Beer Night
Rock Bottom brewery
Saturday 9:00 - midnight

  • -