dynamic_fieldsets 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.0.7
2
+
3
+ * Namespaced the models and tables in the install migration
4
+ * Note that this change is not backwards compatible with older versions
5
+
1
6
  == 0.0.6
2
7
 
3
8
  * Moved the javascript includes into the view so this is usable out of the box.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -4,6 +4,7 @@ module DynamicFieldsets
4
4
  #
5
5
  # @author John "hex" Carter
6
6
  class Dependency < ActiveRecord::Base
7
+ set_table_name "dynamic_fieldsets_dependencies"
7
8
 
8
9
  RELATIONSHIP_LIST = ["equals","not equals","includes","not includes","blank","not blank"]
9
10
 
@@ -3,6 +3,7 @@ module DynamicFieldsets
3
3
  #
4
4
  # @author Jeremiah Hemphill
5
5
  class DependencyClause < ActiveRecord::Base
6
+ set_table_name "dynamic_fieldsets_dependency_clauses"
6
7
  belongs_to :dependency_group
7
8
 
8
9
  has_many :dependencies
@@ -1,5 +1,6 @@
1
1
  module DynamicFieldsets
2
2
  class DependencyGroup < ActiveRecord::Base
3
+ set_table_name "dynamic_fieldsets_dependency_groups"
3
4
  belongs_to :fieldset_child
4
5
 
5
6
  has_many :dependency_clauses
@@ -3,6 +3,7 @@ module DynamicFieldsets
3
3
  #
4
4
  # @author Jeremiah Hemphill, Ethan Pemble
5
5
  class Field < ActiveRecord::Base
6
+ set_table_name "dynamic_fieldsets_fields"
6
7
  # Relations
7
8
 
8
9
  # parents
@@ -5,6 +5,7 @@ module DynamicFieldsets
5
5
  #
6
6
  # @authors Scott Sampson, Jeremiah Hemphill, Ethan Pemble
7
7
  class FieldDefault < ActiveRecord::Base
8
+ set_table_name "dynamic_fieldsets_field_defaults"
8
9
  #relations
9
10
  belongs_to :field
10
11
 
@@ -5,6 +5,7 @@ module DynamicFieldsets
5
5
  #
6
6
  # @authors Scott Sampson, Jeremiah Hemphill, Ethan Pemble
7
7
  class FieldHtmlAttribute < ActiveRecord::Base
8
+ set_table_name "dynamic_fieldsets_field_html_attributes"
8
9
  #relations
9
10
  belongs_to :field
10
11
 
@@ -12,4 +13,4 @@ module DynamicFieldsets
12
13
  validates_presence_of :attribute_name
13
14
  validates_presence_of :value
14
15
  end
15
- end
16
+ end
@@ -5,6 +5,7 @@ module DynamicFieldsets
5
5
  #
6
6
  # @authors Scott Sampson, Jeremiah Hemphill, Ethan Pemble
7
7
  class FieldOption < ActiveRecord::Base
8
+ set_table_name "dynamic_fieldsets_field_options"
8
9
  #relations
9
10
  belongs_to :field
10
11
 
@@ -2,6 +2,8 @@ module DynamicFieldsets
2
2
  # Stores a single record's answer to a field in a fieldset
3
3
  # Fields with multiple answers should have multiple records in this model
4
4
  class FieldRecord < ActiveRecord::Base
5
+ set_table_name "dynamic_fieldsets_field_records"
6
+
5
7
  belongs_to :fieldset_child
6
8
  belongs_to :fieldset_associator
7
9
 
@@ -3,6 +3,8 @@ module DynamicFieldsets
3
3
  #
4
4
  # @author Jeremiah Hemphill, Ethan Pemble
5
5
  class Fieldset < ActiveRecord::Base
6
+ set_table_name "dynamic_fieldsets_fieldsets"
7
+
6
8
  # Relations
7
9
  has_many :fieldset_associators
8
10
 
@@ -1,5 +1,7 @@
1
1
  module DynamicFieldsets
2
2
  class FieldsetAssociator < ActiveRecord::Base
3
+ set_table_name "dynamic_fieldsets_fieldset_associators"
4
+
3
5
  belongs_to :fieldset
4
6
  belongs_to :fieldset_model, :polymorphic => true
5
7
  has_many :field_records
@@ -3,6 +3,7 @@ module DynamicFieldsets
3
3
  # FieldsetChild
4
4
  # @author Jeremiah Hemphill, John "hex" Carter
5
5
  class FieldsetChild < ActiveRecord::Base
6
+ set_table_name "dynamic_fieldsets_fieldset_children"
6
7
 
7
8
  # Constants
8
9
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dynamic_fieldsets}
8
- s.version = "0.0.6"
8
+ s.version = "0.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Jeremiah Hemphill}, %q{Ethan Pemble}, %q{John Carter}]
12
- s.date = %q{2011-11-09}
12
+ s.date = %q{2011-11-10}
13
13
  s.description = %q{Dynamic fieldsets for rails controllers}
14
14
  s.email = %q{jeremiah@cloudspace.com}
15
15
  s.extra_rdoc_files = [
@@ -1,6 +1,6 @@
1
1
  class <%= migration_class_name %> < ActiveRecord::Migration
2
2
  def self.up
3
- create_table :fieldset_associators do |t|
3
+ create_table :dynamic_fieldsets_fieldset_associators do |t|
4
4
  t.integer :fieldset_id
5
5
  t.integer :fieldset_model_id
6
6
  t.string :fieldset_model_type
@@ -9,7 +9,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration
9
9
  t.timestamps
10
10
  end
11
11
 
12
- create_table :fieldset_children do |t|
12
+ create_table :dynamic_fieldsets_fieldset_children do |t|
13
13
  t.integer :fieldset_id
14
14
  t.integer :child_id
15
15
  t.string :child_type
@@ -18,17 +18,17 @@ class <%= migration_class_name %> < ActiveRecord::Migration
18
18
  t.timestamps
19
19
  end
20
20
 
21
- create_table :fieldsets do |t|
21
+ create_table :dynamic_fieldsets_fieldsets do |t|
22
22
  t.string :nkey, :null => false
23
23
  t.string :name
24
24
  t.text :description
25
25
 
26
26
  t.timestamps
27
27
  end
28
- add_index :fieldsets, :nkey, :unique => true
28
+ add_index :dynamic_fieldsets_fieldsets, :nkey, :unique => true
29
29
 
30
30
 
31
- create_table :fields do |t|
31
+ create_table :dynamic_fieldsets_fields do |t|
32
32
  t.string :name
33
33
  t.string :label, :required => true
34
34
  t.string :field_type, :required => true
@@ -38,7 +38,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration
38
38
  t.timestamps
39
39
  end
40
40
 
41
- create_table :field_options do |t|
41
+ create_table :dynamic_fieldsets_field_options do |t|
42
42
  t.integer :field_id
43
43
  t.string :name
44
44
  t.boolean :enabled, :default => true
@@ -46,14 +46,14 @@ class <%= migration_class_name %> < ActiveRecord::Migration
46
46
  t.timestamps
47
47
  end
48
48
 
49
- create_table :field_defaults do |t|
49
+ create_table :dynamic_fieldsets_field_defaults do |t|
50
50
  t.integer :field_id
51
51
  t.string :value
52
52
 
53
53
  t.timestamps
54
54
  end
55
55
 
56
- create_table :field_html_attributes do |t|
56
+ create_table :dynamic_fieldsets_field_html_attributes do |t|
57
57
  t.integer :field_id
58
58
  t.string :attribute_name, :required => true # couldn't use attribute because it is used by active record
59
59
  t.string :value, :required => true
@@ -61,7 +61,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration
61
61
  t.timestamps
62
62
  end
63
63
 
64
- create_table :field_records do |t|
64
+ create_table :dynamic_fieldsets_field_records do |t|
65
65
  t.integer :fieldset_associator_id
66
66
  t.integer :fieldset_child_id
67
67
  t.text :value
@@ -69,7 +69,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration
69
69
  t.timestamps
70
70
  end
71
71
 
72
- create_table :dependencies do |t|
72
+ create_table :dynamic_fieldsets_dependencies do |t|
73
73
  t.integer :fieldset_child_id
74
74
  t.string :value
75
75
  t.string :relationship
@@ -78,13 +78,13 @@ class <%= migration_class_name %> < ActiveRecord::Migration
78
78
  t.timestamps
79
79
  end
80
80
 
81
- create_table :dependency_clauses do |t|
81
+ create_table :dynamic_fieldsets_dependency_clauses do |t|
82
82
  t.integer :dependency_group_id
83
83
 
84
84
  t.timestamps
85
85
  end
86
86
 
87
- create_table :dependency_groups do |t|
87
+ create_table :dynamic_fieldsets_dependency_groups do |t|
88
88
  t.string :action
89
89
  t.integer :fieldset_child_id
90
90
 
@@ -93,16 +93,16 @@ class <%= migration_class_name %> < ActiveRecord::Migration
93
93
  end
94
94
 
95
95
  def self.down
96
- drop_table :fieldsets
97
- drop_table :fieldset_children
98
- drop_table :fields
99
- drop_table :field_options
100
- drop_table :field_defaults
101
- drop_table :field_html_attributes
102
- drop_table :field_records
103
-
104
- drop_table :dependencies
105
- drop_table :dependency_clauses
106
- drop_table :dependency_group
96
+ drop_table :dynamic_fieldsets_fieldsets
97
+ drop_table :dynamic_fieldsets_fieldset_children
98
+ drop_table :dynamic_fieldsets_fields
99
+ drop_table :dynamic_fieldsets_field_options
100
+ drop_table :dynamic_fieldsets_field_defaults
101
+ drop_table :dynamic_fieldsets_field_html_attributes
102
+ drop_table :dynamic_fieldsets_field_records
103
+
104
+ drop_table :dynamic_fieldsets_dependencies
105
+ drop_table :dynamic_fieldsets_dependency_clauses
106
+ drop_table :dynamic_fieldsets_dependency_group
107
107
  end
108
108
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dynamic_fieldsets
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeremiah Hemphill
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2011-11-09 00:00:00 Z
15
+ date: 2011-11-10 00:00:00 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails
@@ -349,7 +349,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
349
349
  requirements:
350
350
  - - ">="
351
351
  - !ruby/object:Gem::Version
352
- hash: 4306683891801116677
352
+ hash: -3894794992591398947
353
353
  segments:
354
354
  - 0
355
355
  version: "0"