変更点
- (1) Rails2 の dirty column に対応
- (2) 一括設定機能を追加
1 class User < ActiveRecord::Base 2 acts_as_bi ts :flags, %w( admin create read update delete ) 3 end 4 5 user = User.new 6 user.admin = true # (1) 7 user.changed? # => true 8 9 user.flags = true # (2) 10 user.flags # => "11111"
インストール
1 % gem install maiha-acts_as_bits --source=h ttp://gems .github.co m
posted by
maiha
on Wed 21 Jan 2009
at 19:56