nay-record_with_operator 0.0.14 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/record_with_operator.rb +2 -2
- 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.
|
15
|
+
VER = "0.0.16"
|
16
16
|
CLEAN.include ['pkg']
|
17
17
|
|
18
18
|
desc 'Default: run unit tests.'
|
data/lib/record_with_operator.rb
CHANGED
@@ -155,9 +155,9 @@ module RecordWithOperator
|
|
155
155
|
end
|
156
156
|
|
157
157
|
def set_deleted_by
|
158
|
-
return unless
|
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.
|
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-
|
12
|
+
date: 2009-05-14 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|