This page lists the built-in Ruby classes and modules, and the methods they contain. Click on a class, module, or method name for a detailed description.
http://dema.ruby.com.br/articles/2005/08/27/easy-tagging-with-rails 今流行のtag付け。最近のWebアプリケーションはネコも杓子もタグ!とりあえず便利そうだから付けとけ!って感じでどうでもいいところまでタグが実装されてたりすることもあって何だかなぁ、って感じだったりもするんだけどそれは置いといて。 どんな風に使えるのかというと、上記記事に書いてあるまんまで class Photo < ActiveRecord::Base acts_as_taggable # これ一行追加するだけ end elephant = Photo.find(4437) # idが4437のphotosテーブルのデータを取得 elephant.tag 'zoo animals nature' # tagをspace区切りで設定。なおphotosテーブ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く