nay-record_with_operator 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/record_with_operator.rb +2 -2
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ DESCRIPTION = "Rails plugin to set created_by, updated_by, deleted_by to ActiveR
12
12
  GITHUB_PROJECT = "record_with_operator"
13
13
  HOMEPAGE = "http://github.com/nay/#{GITHUB_PROJECT}/tree"
14
14
  BIN_FILES = %w( )
15
- VER = "0.0.14"
15
+ VER = "0.0.16"
16
16
  CLEAN.include ['pkg']
17
17
 
18
18
  desc 'Default: run unit tests.'
@@ -155,9 +155,9 @@ module RecordWithOperator
155
155
  end
156
156
 
157
157
  def set_deleted_by
158
- return unless respond_to?(:deleted_by=) && operator
158
+ return unless self.class.column_names.include?("deleted_by") && operator
159
+ self.class.update_all("deleted_by = #{operator.id}", ["#{self.class.primary_key} = ?", id])
159
160
  self.deleted_by = operator.id
160
- save!
161
161
  end
162
162
 
163
163
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nay-record_with_operator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuko Ohba
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-17 00:00:00 -07:00
12
+ date: 2009-05-14 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency