acts_as_data_owner 0.0.2 → 0.0.3

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.
@@ -6,7 +6,7 @@ module ActiveRecord
6
6
  fields = [:creator, :owner, :updater]
7
7
  fields += [options[:include]].flatten if options[:include]
8
8
  fields -= [options[:exclude]].flatten if options[:exclude]
9
-
9
+ prefix = options[:prefix] if options[:prefix]
10
10
  #Add fields to table
11
11
  change_table table_name do |t|
12
12
  fields.each do |f|
@@ -16,7 +16,7 @@ module ActiveRecord
16
16
 
17
17
  #Add indexes
18
18
  fields.each do |f|
19
- add_index table_name, "#{f}_id"
19
+ add_index table_name, "#{f}_id",:name=>(prefix ? "#{prefix}_#{f}" : "index_#{table_name}_on_#{f}" )
20
20
  end
21
21
  end
22
22
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module ActsAsDataOwner
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
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.2
4
+ version: 0.0.3
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-04-24 00:00:00.000000000Z
12
+ date: 2012-05-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails