acts_as_data_owner 0.0.5 → 0.0.6
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.
@@ -15,14 +15,14 @@ module ActsAsDataOwner
|
|
15
15
|
|
16
16
|
(fields-[:company]).each do |f|
|
17
17
|
belongs_to f, :class_name => "Person", :foreign_key => "#{f}_id"
|
18
|
+
before_create :"set_#{f}"
|
18
19
|
end
|
19
20
|
|
20
21
|
if fields.include?(:company)
|
21
22
|
belongs_to :company
|
22
23
|
before_create :set_company
|
23
24
|
end
|
24
|
-
|
25
|
-
before_update :set_updater
|
25
|
+
|
26
26
|
|
27
27
|
scope :current, lambda {
|
28
28
|
conditions = {}
|
@@ -54,8 +54,11 @@ module ActsAsDataOwner
|
|
54
54
|
self.company = Person.current.company
|
55
55
|
end
|
56
56
|
|
57
|
-
def
|
57
|
+
def set_creator
|
58
58
|
self.creator = Person.current
|
59
|
+
end
|
60
|
+
|
61
|
+
def set_owner
|
59
62
|
self.owner = Person.current
|
60
63
|
end
|
61
64
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_data_owner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-14 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -35,8 +35,8 @@ extensions: []
|
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
37
|
- lib/acts_as_data_owner/active_record.rb
|
38
|
-
- lib/acts_as_data_owner/version.rb
|
39
38
|
- lib/acts_as_data_owner/migration.rb
|
39
|
+
- lib/acts_as_data_owner/version.rb
|
40
40
|
- lib/acts_as_data_owner.rb
|
41
41
|
homepage: http://worldalias.com
|
42
42
|
licenses: []
|