klass_name_types 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/klass_name_type.rb +1 -1
- data/lib/klass_name_types.rb +4 -2
- data/lib/tasks/rubyforge_config.yml +1 -1
- metadata +2 -2
data/lib/klass_name_type.rb
CHANGED
@@ -11,7 +11,7 @@ class KlassNameType < ActiveRecord::Base
|
|
11
11
|
unless table_exists?
|
12
12
|
puts "klass_name_types table does not exist, so we're going to create the table."
|
13
13
|
ActiveRecord::Base.connection.create_table(:klass_name_types) do |t|
|
14
|
-
t.column :name, :string, :limit => 100, :null => false
|
14
|
+
t.column :name, :string, :limit => 100, :null => false, :unique => true
|
15
15
|
end
|
16
16
|
end
|
17
17
|
rescue Exception => e
|
data/lib/klass_name_types.rb
CHANGED
@@ -9,8 +9,10 @@ class << ActiveRecord::Base
|
|
9
9
|
unless KlassNameType.table_exists?
|
10
10
|
KlassNameType.create_knt_table
|
11
11
|
end
|
12
|
-
|
13
|
-
KlassNameType.
|
12
|
+
unless child.is_a? ActiveRecord::Migration
|
13
|
+
if KlassNameType.create(:name => c_name)
|
14
|
+
KlassNameType.reload_constants!
|
15
|
+
end
|
14
16
|
end
|
15
17
|
end
|
16
18
|
rescue Exception => e
|
metadata
CHANGED
@@ -3,8 +3,8 @@ 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.
|
7
|
-
date: 2007-09-
|
6
|
+
version: 1.0.2
|
7
|
+
date: 2007-09-20 00:00:00 -04:00
|
8
8
|
summary: klass_name_types
|
9
9
|
require_paths:
|
10
10
|
- lib
|