cowtech-rails 1.9.6.1 → 1.9.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cowtech/extensions.rb +0 -16
- data/lib/cowtech/version.rb +2 -2
- metadata +3 -3
data/lib/cowtech/extensions.rb
CHANGED
@@ -17,22 +17,6 @@ module Cowtech
|
|
17
17
|
extend ActiveSupport::Concern
|
18
18
|
|
19
19
|
module ClassMethods
|
20
|
-
if defined?(Rails) then
|
21
|
-
def table_prefix
|
22
|
-
p = ActiveRecord::Base.configurations[Rails.env]["table_prefix"]
|
23
|
-
!p.blank? ? p + "_" : ""
|
24
|
-
end
|
25
|
-
|
26
|
-
def table_suffix
|
27
|
-
p = ActiveRecord::Base.configurations[Rails.env]["table_suffix"]
|
28
|
-
!p.blank? ? p + "_" : ""
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def set_table_name(value = nil, &block)
|
33
|
-
define_attr_method :table_name, "#{ActiveRecord::Base.table_prefix}#{value}#{ActiveRecord::Base.table_suffix}", &block
|
34
|
-
end
|
35
|
-
|
36
20
|
def find_or_create(oid, attributes = nil)
|
37
21
|
begin
|
38
22
|
self.find(oid)
|
data/lib/cowtech/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cowtech-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-08-02 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cowtech-extensions
|
16
|
-
requirement: &
|
16
|
+
requirement: &70282178784700 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70282178784700
|
25
25
|
description: A general purpose Rails utility plugin.
|
26
26
|
email: shogun_panda@me.com
|
27
27
|
executables: []
|