rails-acts_as_paranoidの履歴
参考
Github
[Github for rails 3.1>https://github.com/goncalossilva/rails3_acts_as_paranoid/tre...]]
1. installing
> vi Gemfile ----- gem 'rails3_acts_as_paranoid', '~>0.1.4' ----- :wq > bundle ... Installing rails3_acts_as_paranoid (0.1.4) ... Your bundle is complete! ...
2. setting for migration
vi db/migrate/yyyymmddhhmiss_update_modelname.rb * yyyymmddhhmiss: replace datetime, modelname: replace real model name ----- class UpdateModelname < ActiveRecord::Migration def self.up add_column :modelname, :deleted_at, :datetime end def self.down remove_column :modelname, :deleted_at end end ----- :wq > rake db:migrate
3. setting for model
vi app/models/modelname.rb ----- class Modelname < ActiveRecord::Base acts_as_paranoid end ----- :wq > rails server * require reboots
done!
※一応動作確認出来ました。