spud_inquiries 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,4 +4,13 @@ class SpudInquiryFormField < ActiveRecord::Base
4
4
  validates :field_type,:presence => true
5
5
  attr_accessible :name,:options,:default_value,:field_type,:spud_inquiry_form_id,:field_order,:required
6
6
 
7
+
8
+ def options_list
9
+ return [] if self.options.blank?
10
+ self.options.split(/\,*?(".*?")\,*?/).map{|x| x=~/^".*"$/ ? x.gsub(/\"/,"") : x.split(',')}.flatten.select{|p| !p.strip.blank?}
11
+
12
+ end
13
+
14
+
15
+
7
16
  end
@@ -24,7 +24,7 @@
24
24
  when '2'
25
25
  f.text_area field.name,:value => params[:spud_inquiry].blank? || params[:spud_inquiry][field.name].blank? ? field.default_value : params[:spud_inquiry][field.name],:rows=>5,:cols => 70
26
26
  when '3'
27
- f.select field.name,field.options.split(",").collect {|opt| [opt,opt]},:include_blank => true
27
+ f.select field.name,field.options_list.collect {|opt| [opt,opt]},:include_blank => true
28
28
  end%>
29
29
  </div>
30
30
  </div>
@@ -0,0 +1,9 @@
1
+ class ChangeInquiryFormFieldsColumn < ActiveRecord::Migration
2
+ def up
3
+ change_column :spud_inquiry_form_fields, :options, :text
4
+ end
5
+
6
+ def down
7
+ change_column :spud_inquiry_form_fields, :options, :string
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Inquiries
3
- VERSION = "0.8.2"
3
+ VERSION = "0.8.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud_inquiries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-06 00:00:00.000000000 Z
12
+ date: 2012-04-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70277897275660 !ruby/object:Gem::Requirement
16
+ requirement: &70157590632880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70277897275660
24
+ version_requirements: *70157590632880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spud_core
27
- requirement: &70277897275080 !ruby/object:Gem::Requirement
27
+ requirement: &70157590632160 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 0.9.0
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *70277897275080
38
+ version_requirements: *70157590632160
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: mysql2
41
- requirement: &70277897290700 !ruby/object:Gem::Requirement
41
+ requirement: &70157590631080 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: '0'
47
47
  type: :development
48
48
  prerelease: false
49
- version_requirements: *70277897290700
49
+ version_requirements: *70157590631080
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rspec
52
- requirement: &70277897290080 !ruby/object:Gem::Requirement
52
+ requirement: &70157590630620 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: '0'
58
58
  type: :development
59
59
  prerelease: false
60
- version_requirements: *70277897290080
60
+ version_requirements: *70157590630620
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rspec-rails
63
- requirement: &70277897289420 !ruby/object:Gem::Requirement
63
+ requirement: &70157590630120 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: '0'
69
69
  type: :development
70
70
  prerelease: false
71
- version_requirements: *70277897289420
71
+ version_requirements: *70157590630120
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: factory_girl
74
- requirement: &70277897288600 !ruby/object:Gem::Requirement
74
+ requirement: &70157590629360 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - =
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: 2.5.0
80
80
  type: :development
81
81
  prerelease: false
82
- version_requirements: *70277897288600
82
+ version_requirements: *70157590629360
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mocha
85
- requirement: &70277897288100 !ruby/object:Gem::Requirement
85
+ requirement: &70157590628640 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - =
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: 0.10.3
91
91
  type: :development
92
92
  prerelease: false
93
- version_requirements: *70277897288100
93
+ version_requirements: *70157590628640
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: database_cleaner
96
- requirement: &70277897287220 !ruby/object:Gem::Requirement
96
+ requirement: &70157590627920 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - =
@@ -101,7 +101,7 @@ dependencies:
101
101
  version: 0.7.1
102
102
  type: :development
103
103
  prerelease: false
104
- version_requirements: *70277897287220
104
+ version_requirements: *70157590627920
105
105
  description: This gem allows you to build forms for user submission and can send email
106
106
  notifications when a form is filled out.
107
107
  email:
@@ -146,6 +146,7 @@ files:
146
146
  - db/migrate/20120126132407_add_spud_inquiry_form_id_to_spud_inquiries.rb
147
147
  - db/migrate/20120126132522_add_recipients_to_spud_inquiry_forms.rb
148
148
  - db/migrate/20120127023335_add_url_name_to_spud_inquiry_forms.rb
149
+ - db/migrate/20120413124900_change_inquiry_form_fields_column.rb
149
150
  - lib/spud_inquiries/configuration.rb
150
151
  - lib/spud_inquiries/engine.rb
151
152
  - lib/spud_inquiries/version.rb
@@ -197,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
197
198
  version: '0'
198
199
  segments:
199
200
  - 0
200
- hash: -1708317933795306418
201
+ hash: 1304331212933766404
201
202
  required_rubygems_version: !ruby/object:Gem::Requirement
202
203
  none: false
203
204
  requirements:
@@ -206,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
207
  version: '0'
207
208
  segments:
208
209
  - 0
209
- hash: -1708317933795306418
210
+ hash: 1304331212933766404
210
211
  requirements: []
211
212
  rubyforge_project:
212
213
  rubygems_version: 1.8.15