klass_name_types 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+
1
2
  class << ActiveRecord::Base
2
3
 
3
4
  alias_method :ar_inherited, :inherited
@@ -9,14 +10,45 @@ class << ActiveRecord::Base
9
10
  unless KlassNameType.table_exists?
10
11
  KlassNameType.create_knt_table
11
12
  end
12
- unless child.is_a? ActiveRecord::Migration
13
- if KlassNameType.create(:name => c_name)
14
- KlassNameType.reload_constants!
15
- end
13
+ if KlassNameType.create(:name => c_name)
14
+ # puts "Created KlassNameType: #{c_name}"
15
+ KlassNameType.reload_constants!
16
16
  end
17
17
  end
18
18
  rescue Exception => e
19
19
  end
20
20
  ar_inherited(child)
21
21
  end
22
- end
22
+ end
23
+
24
+ class ActiveRecord::Migration
25
+
26
+
27
+ end
28
+
29
+ # path = File.expand_path(RAILS_ROOT + "/app/models")
30
+ # puts path
31
+ #
32
+ # FileUtils.mkdir_p(path) unless File.exists?(path)
33
+ #
34
+ # Find.find(path) do |f|
35
+ # if FileTest.directory?(f) and f =~ /\.svn/
36
+ # Find.prune
37
+ # else
38
+ # if FileTest.file?(f)
39
+ # f.gsub!(path, "")
40
+ # m = f.match(/\/[a-zA\-Z-_]*.rb/)
41
+ # if m
42
+ # model = m.to_s
43
+ # x = model.gsub('/', '').gsub('.rb', '')
44
+ # begin
45
+ # # puts "x = #{x}"
46
+ # puts "path/x = #{path}/#{x}"
47
+ # require "#{path}/#{x}"
48
+ # rescue => ex
49
+ # puts ex
50
+ # end
51
+ # end
52
+ # end
53
+ # end
54
+ # end
@@ -2,4 +2,4 @@
2
2
  gem_name: klass_name_types
3
3
  package: klass_name_types
4
4
  project: magrathea
5
- version: 1.0.2
5
+ version: 1.0.3
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: klass_name_types
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.2
6
+ version: 1.0.3
7
7
  date: 2007-09-20 00:00:00 -04:00
8
8
  summary: klass_name_types
9
9
  require_paths: