rails-acts_as_paranoidの履歴
参考
Github
[Github for rails 3.1>https://github.com/goncalossilva/rails3_acts_as_paranoid/tre...]]
1. installing
<pre>
> vi Gemfile
gem 'rails3_acts_as_paranoid', '~>0.1.4'
:wq
> bundle
...
Installing rails3_acts_as_paranoid (0.1.4)
...
Your bundle is complete! ...
</pre>
2. setting for migration
<pre>
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
</pre>
3. setting for model
<pre>
vi app/models/modelname.rb
class Modelname < ActiveRecord::Base
acts_as_paranoid
end
:wq
> rails server
require reboots
</pre>
done!
※一応動作確認出来ました。