active_scaffold 3.4.30 → 3.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +13 -5
- data/CHANGELOG +9 -0
- data/lib/active_scaffold/actions/core.rb +7 -10
- data/lib/active_scaffold/actions/create.rb +2 -6
- data/lib/active_scaffold/actions/delete.rb +2 -6
- data/lib/active_scaffold/actions/list.rb +2 -6
- data/lib/active_scaffold/actions/nested.rb +4 -12
- data/lib/active_scaffold/actions/show.rb +2 -6
- data/lib/active_scaffold/actions/update.rb +2 -6
- data/lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb +10 -3
- data/lib/active_scaffold/config/base.rb +33 -5
- data/lib/active_scaffold/config/field_search.rb +2 -10
- data/lib/active_scaffold/config/form.rb +3 -10
- data/lib/active_scaffold/config/list.rb +1 -7
- data/lib/active_scaffold/config/search.rb +1 -2
- data/lib/active_scaffold/config/show.rb +1 -7
- data/lib/active_scaffold/config/subform.rb +1 -16
- data/lib/active_scaffold/delayed_setup.rb +1 -0
- data/lib/active_scaffold/extensions/reverse_associations.rb +1 -1
- data/lib/active_scaffold/helpers/form_column_helpers.rb +1 -0
- data/lib/active_scaffold/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Njc3MTJmNmJkOTRhZjNjYzQzZjc3ZTQ5NDM4ZjA3YzY4NTQ4ODE0Ng==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2IzMjdhNDI5ZDlmNjRjZTY2OWJhYTY2MjlkYmNiMDViNjUwMjU1Zg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YzE2YWM2M2M2MzY1YWU1NGNiYzIxNDdmZTgwN2E2YmZjYzJlMGVkYmJjY2U3
|
10
|
+
N2NjZjUyYjkyMzBmODZlNDFhYWE2MDE3ODBlNWY1NjZmYTI5YmFhOGQ5OWI0
|
11
|
+
NWI3N2Q3ZTRkMmNhZjE1MzllYWZiMTEwMjk2ZTVkYmQ1ZWE0YmY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
Nzk2OWRhNTk5OWU4YjE3OTBlODc0OWJkODllZjAzYjliODVmM2QzNTQwYTEy
|
14
|
+
NWE5MTk1Njc5MWRiYzhiNjMxOTg5OTFjZjljN2M0ZjIxM2U0NzhmZmVhMTM1
|
15
|
+
ZmUxZGJmOWM0NTU3OTdlM2M3NzAwNGZmYTcyN2E2MDlkMzU0ZDA=
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
= 3.4.31
|
2
|
+
- fix multiple support for :select form_ui with non-association columns
|
3
|
+
- remove yaml response support, not used in rails usually and no support for respond_to :yaml
|
4
|
+
- clean code to generate API responses (json/xml)
|
5
|
+
- really fix compatibility with composite primary keys gem
|
6
|
+
- fix country select on rails 3.2
|
7
|
+
- ensure prefixes have active_scaffold_overrides when delayed_setup is used
|
8
|
+
|
9
|
+
= 3.4.30
|
1
10
|
- move jquery-ui images to app/assets for rails 4.2 compatibility
|
2
11
|
- clean css so no need to reverse links on nested
|
3
12
|
- fix responds_to_parent with redirect
|
@@ -97,7 +97,8 @@ module ActiveScaffold::Actions
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def set_parent(record)
|
100
|
-
|
100
|
+
controller = "#{params[:parent_controller].camelize}Controller".constantize
|
101
|
+
parent_model = controller.active_scaffold_config.model
|
101
102
|
child_association = params[:child_association].presence || @scope.split(']').first.sub(/^\[/, '')
|
102
103
|
association = parent_model.reflect_on_association(child_association.to_sym).try(:reverse)
|
103
104
|
return if association.nil?
|
@@ -148,7 +149,7 @@ module ActiveScaffold::Actions
|
|
148
149
|
end
|
149
150
|
|
150
151
|
def default_formats
|
151
|
-
[:html, :js, :json, :xml
|
152
|
+
[:html, :js, :json, :xml]
|
152
153
|
end
|
153
154
|
|
154
155
|
# Returns true if the client accepts one of the MIME types passed to it
|
@@ -175,9 +176,9 @@ module ActiveScaffold::Actions
|
|
175
176
|
end
|
176
177
|
end
|
177
178
|
|
178
|
-
# API response object that will be converted to XML/
|
179
|
+
# API response object that will be converted to XML/JSON using to_xxx
|
179
180
|
def response_object
|
180
|
-
@response_object
|
181
|
+
@response_object ||= successful? ? (@record || @records) : @record.errors
|
181
182
|
end
|
182
183
|
|
183
184
|
# Success is the existence of one or more model objects. Most actions
|
@@ -331,15 +332,11 @@ module ActiveScaffold::Actions
|
|
331
332
|
end
|
332
333
|
|
333
334
|
def action_update_respond_to_xml
|
334
|
-
render :xml => successful? ? '' : response_object
|
335
|
+
render :xml => successful? ? '' : response_object, :only => list_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(list_columns_names), :methods => virtual_columns(list_columns_names), :status => response_status
|
335
336
|
end
|
336
337
|
|
337
338
|
def action_update_respond_to_json
|
338
|
-
render :
|
339
|
-
end
|
340
|
-
|
341
|
-
def action_update_respond_to_yaml
|
342
|
-
render :text => successful? ? '' : Hash.from_xml(response_object.to_xml(:only => list_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(list_columns_names), :methods => virtual_columns(list_columns_names))).to_yaml, :content_type => Mime::YAML, :status => response_status
|
339
|
+
render :json => successful? ? '' : response_object, :only => list_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(list_columns_names), :methods => virtual_columns(list_columns_names), :status => response_status
|
343
340
|
end
|
344
341
|
|
345
342
|
def objects_for_etag
|
@@ -68,15 +68,11 @@ module ActiveScaffold::Actions
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def create_respond_to_xml
|
71
|
-
render :xml => response_object
|
71
|
+
render :xml => response_object, :only => create_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(create_columns_names), :methods => virtual_columns(create_columns_names), :status => response_status, :location => response_location
|
72
72
|
end
|
73
73
|
|
74
74
|
def create_respond_to_json
|
75
|
-
render :
|
76
|
-
end
|
77
|
-
|
78
|
-
def create_respond_to_yaml
|
79
|
-
render :text => Hash.from_xml(response_object.to_xml(:only => create_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(create_columns_names), :methods => virtual_columns(create_columns_names))).to_yaml, :content_type => Mime::YAML, :status => response_status, :location => response_location
|
75
|
+
render :json => response_object, :only => create_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(create_columns_names), :methods => virtual_columns(create_columns_names), :status => response_status, :location => response_location
|
80
76
|
end
|
81
77
|
|
82
78
|
def create_columns_names
|
@@ -24,15 +24,11 @@ module ActiveScaffold::Actions
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def destroy_respond_to_xml
|
27
|
-
render :xml => successful? ? '' : response_object
|
27
|
+
render :xml => successful? ? '' : response_object, :only => active_scaffold_config.list.columns.names, :status => response_status
|
28
28
|
end
|
29
29
|
|
30
30
|
def destroy_respond_to_json
|
31
|
-
render :
|
32
|
-
end
|
33
|
-
|
34
|
-
def destroy_respond_to_yaml
|
35
|
-
render :text => successful? ? '' : Hash.from_xml(response_object.to_xml(:only => active_scaffold_config.list.columns.names)).to_yaml, :content_type => Mime::YAML, :status => response_status
|
31
|
+
render :json => successful? ? '' : response_object, :only => active_scaffold_config.list.columns.names, :status => response_status
|
36
32
|
end
|
37
33
|
|
38
34
|
def destroy_find_record
|
@@ -48,15 +48,11 @@ module ActiveScaffold::Actions
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def list_respond_to_xml
|
51
|
-
render :xml => response_object
|
51
|
+
render :xml => response_object, :only => list_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(list_columns_names), :methods => virtual_columns(list_columns_names), :status => response_status
|
52
52
|
end
|
53
53
|
|
54
54
|
def list_respond_to_json
|
55
|
-
render :
|
56
|
-
end
|
57
|
-
|
58
|
-
def list_respond_to_yaml
|
59
|
-
render :text => Hash.from_xml(response_object.to_xml(:only => list_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(list_columns_names), :methods => virtual_columns(list_columns_names))).to_yaml, :content_type => Mime::YAML, :status => response_status
|
55
|
+
render :json => response_object, :only => list_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(list_columns_names), :methods => virtual_columns(list_columns_names), :status => response_status
|
60
56
|
end
|
61
57
|
|
62
58
|
def row_respond_to_html
|
@@ -181,15 +181,11 @@ module ActiveScaffold::Actions::Nested
|
|
181
181
|
end
|
182
182
|
|
183
183
|
def add_existing_respond_to_xml
|
184
|
-
render :xml => response_object
|
184
|
+
render :xml => response_object, :only => active_scaffold_config.list.columns.names, :status => response_status
|
185
185
|
end
|
186
186
|
|
187
187
|
def add_existing_respond_to_json
|
188
|
-
render :
|
189
|
-
end
|
190
|
-
|
191
|
-
def add_existing_respond_to_yaml
|
192
|
-
render :text => Hash.from_xml(response_object.to_xml(:only => active_scaffold_config.list.columns.names)).to_yaml, :content_type => Mime::YAML, :status => response_status
|
188
|
+
render :json => response_object, :only => active_scaffold_config.list.columns.names, :status => response_status
|
193
189
|
end
|
194
190
|
|
195
191
|
def destroy_existing_respond_to_html
|
@@ -202,15 +198,11 @@ module ActiveScaffold::Actions::Nested
|
|
202
198
|
end
|
203
199
|
|
204
200
|
def destroy_existing_respond_to_xml
|
205
|
-
render :xml => successful? ? '' : response_object
|
201
|
+
render :xml => successful? ? '' : response_object, :only => active_scaffold_config.list.columns.names, :status => response_status
|
206
202
|
end
|
207
203
|
|
208
204
|
def destroy_existing_respond_to_json
|
209
|
-
render :
|
210
|
-
end
|
211
|
-
|
212
|
-
def destroy_existing_respond_to_yaml
|
213
|
-
render :text => successful? ? '' : Hash.from_xml(response_object.to_xml(:only => active_scaffold_config.list.columns.names)).to_yaml, :content_type => Mime::YAML, :status => response_status
|
205
|
+
render :json => successful? ? '' : response_object, :only => active_scaffold_config.list.columns.names, :status => response_status
|
214
206
|
end
|
215
207
|
|
216
208
|
def add_existing_authorized?(record = nil)
|
@@ -19,15 +19,11 @@ module ActiveScaffold::Actions
|
|
19
19
|
protected
|
20
20
|
|
21
21
|
def show_respond_to_json
|
22
|
-
render :
|
23
|
-
end
|
24
|
-
|
25
|
-
def show_respond_to_yaml
|
26
|
-
render :text => Hash.from_xml(response_object.to_xml(:only => show_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(show_columns_names), :methods => virtual_columns(show_columns_names))).to_yaml, :content_type => Mime::YAML, :status => response_status
|
22
|
+
render :json => response_object, :only => show_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(show_columns_names), :methods => virtual_columns(show_columns_names), :status => response_status
|
27
23
|
end
|
28
24
|
|
29
25
|
def show_respond_to_xml
|
30
|
-
render :xml => response_object
|
26
|
+
render :xml => response_object, :only => show_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(show_columns_names), :methods => virtual_columns(show_columns_names), :status => response_status
|
31
27
|
end
|
32
28
|
|
33
29
|
def show_respond_to_js
|
@@ -74,15 +74,11 @@ module ActiveScaffold::Actions
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def update_respond_to_xml
|
77
|
-
render :xml => response_object
|
77
|
+
render :xml => response_object, :only => update_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(update_columns_names), :methods => virtual_columns(update_columns_names), :status => response_status
|
78
78
|
end
|
79
79
|
|
80
80
|
def update_respond_to_json
|
81
|
-
render :
|
82
|
-
end
|
83
|
-
|
84
|
-
def update_respond_to_yaml
|
85
|
-
render :text => Hash.from_xml(response_object.to_xml(:only => update_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(update_columns_names), :methods => virtual_columns(update_columns_names))).to_yaml, :content_type => Mime::YAML, :status => response_status
|
81
|
+
render :json => response_object, :only => update_columns_names + [active_scaffold_config.model.primary_key], :include => association_columns(update_columns_names), :methods => virtual_columns(update_columns_names), :status => response_status
|
86
82
|
end
|
87
83
|
|
88
84
|
def update_columns_names
|
@@ -2,15 +2,22 @@ module ActiveScaffold::Bridges
|
|
2
2
|
class CountryHelper
|
3
3
|
module CountryHelpers
|
4
4
|
def country_select_class
|
5
|
+
# TODO remove when rails 3.2 support is dropped
|
5
6
|
defined?(ActionView::Helpers::InstanceTag) ? ActionView::Helpers::InstanceTag : ActionView::Helpers::Tags::CountrySelect
|
6
7
|
end
|
8
|
+
|
9
|
+
def country_select_options(options)
|
10
|
+
# TODO remove when rails 3.2 support is dropped
|
11
|
+
defined?(ActionView::Helpers::InstanceTag) ? options[:object] : options
|
12
|
+
end
|
13
|
+
|
7
14
|
# Return select and option tags for the given object and method, using country_options_for_select to generate the list of option tags.
|
8
15
|
def country_select(object, method, priority_countries = nil, options = {}, html_options = {})
|
9
|
-
country_select_class.new(object, method, self, options).to_country_select_tag(priority_countries, options, html_options)
|
16
|
+
country_select_class.new(object, method, self, country_select_options(options)).to_country_select_tag(priority_countries, options, html_options)
|
10
17
|
end
|
11
18
|
|
12
19
|
def usa_state_select(object, method, priority_states = nil, options = {}, html_options = {})
|
13
|
-
country_select_class.new(object, method, self, options).to_usa_state_select_tag(priority_states, options, html_options)
|
20
|
+
country_select_class.new(object, method, self, country_select_options(options)).to_usa_state_select_tag(priority_states, options, html_options)
|
14
21
|
end
|
15
22
|
end
|
16
23
|
|
@@ -360,7 +367,7 @@ ActionView::Base.class_eval do
|
|
360
367
|
include ActiveScaffold::Bridges::CountryHelper::FormColumnHelpers
|
361
368
|
include ActiveScaffold::Bridges::CountryHelper::SearchColumnHelpers
|
362
369
|
end
|
363
|
-
if defined? ActionView::Helpers::InstanceTag
|
370
|
+
if defined? ActionView::Helpers::InstanceTag # TODO remove when rails 3.2 support is dropped
|
364
371
|
ActionView::Helpers::InstanceTag.class_eval do
|
365
372
|
include ActiveScaffold::Bridges::CountryHelper::CountryOptionsHelpers
|
366
373
|
include ActiveScaffold::Bridges::CountryHelper::InstanceTagMethods
|
@@ -80,14 +80,42 @@ module ActiveScaffold::Config
|
|
80
80
|
|
81
81
|
private
|
82
82
|
|
83
|
-
def
|
84
|
-
|
85
|
-
@columns ||= ActiveScaffold::DataStructures::ActionColumns.new(*val).tap do |columns|
|
83
|
+
def build_action_columns(val)
|
84
|
+
ActiveScaffold::DataStructures::ActionColumns.new(*val).tap do |columns|
|
86
85
|
columns.action = self
|
87
|
-
columns.set_columns(@core.columns)
|
86
|
+
columns.set_columns(@core.columns)
|
88
87
|
columns
|
89
88
|
end
|
90
|
-
|
89
|
+
end
|
90
|
+
|
91
|
+
def self.columns_accessor(*names, &block)
|
92
|
+
options = names.extract_options!
|
93
|
+
names.each do |name|
|
94
|
+
var = "@#{name}"
|
95
|
+
define_method "#{name}=" do |val|
|
96
|
+
if instance_variable_get(var)
|
97
|
+
instance_variable_get(var).set_values(*val)
|
98
|
+
else
|
99
|
+
instance_variable_set(var, build_action_columns(val))
|
100
|
+
end
|
101
|
+
instance_variable_get(var)
|
102
|
+
end
|
103
|
+
|
104
|
+
define_method name do
|
105
|
+
unless instance_variable_get(var) # lazy evaluation
|
106
|
+
action, columns = options[:copy] if options[:copy]
|
107
|
+
if action && @core.actions.include?(action)
|
108
|
+
action_columns = @core.send(action).send(columns || :columns).clone
|
109
|
+
action_columns.action = self
|
110
|
+
instance_variable_set(var, action_columns)
|
111
|
+
else
|
112
|
+
self.send("#{name}=", @core.columns._inheritable)
|
113
|
+
end
|
114
|
+
instance_exec &block if block
|
115
|
+
end
|
116
|
+
instance_variable_get(var)
|
117
|
+
end
|
118
|
+
end
|
91
119
|
end
|
92
120
|
end
|
93
121
|
end
|
@@ -31,18 +31,10 @@ module ActiveScaffold::Config
|
|
31
31
|
# instance-level configuration
|
32
32
|
# ----------------------------
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
# we want to delay initializing to the @core.columns set for as long as possible. Too soon and .search_sql will not be available to .searchable?
|
37
|
-
unless @columns
|
38
|
-
self.columns = @core.columns._inheritable
|
39
|
-
columns.exclude @core.columns.active_record_class.locking_column.to_sym
|
40
|
-
end
|
41
|
-
@columns
|
34
|
+
columns_accessor :columns do
|
35
|
+
columns.exclude @core.columns.active_record_class.locking_column.to_sym
|
42
36
|
end
|
43
37
|
|
44
|
-
public :columns=
|
45
|
-
|
46
38
|
# A flag for how the search should do full-text searching in the database:
|
47
39
|
# * :full: LIKE %?%
|
48
40
|
# * :start: LIKE ?%
|
@@ -41,18 +41,11 @@ module ActiveScaffold::Config
|
|
41
41
|
# whether we should refresh list after create or not
|
42
42
|
attr_accessor :refresh_list
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
self.columns = @core.columns._inheritable
|
48
|
-
columns.exclude :created_on, :created_at, :updated_on, :updated_at, :as_marked
|
49
|
-
columns.exclude *@core.columns.collect { |c| c.name if c.polymorphic_association? }.compact
|
50
|
-
end
|
51
|
-
@columns
|
44
|
+
columns_accessor :columns do
|
45
|
+
columns.exclude :created_on, :created_at, :updated_on, :updated_at, :as_marked
|
46
|
+
columns.exclude *@core.columns.collect { |c| c.name if c.polymorphic_association? }.compact
|
52
47
|
end
|
53
48
|
|
54
|
-
public :columns=
|
55
|
-
|
56
49
|
# whether the form should be multipart
|
57
50
|
attr_writer :multipart
|
58
51
|
def multipart?
|
@@ -106,13 +106,7 @@ module ActiveScaffold::Config
|
|
106
106
|
# instance-level configuration
|
107
107
|
# ----------------------------
|
108
108
|
|
109
|
-
|
110
|
-
def columns
|
111
|
-
self.columns = @core.columns._inheritable unless @columns # lazy evaluation
|
112
|
-
@columns
|
113
|
-
end
|
114
|
-
|
115
|
-
public :columns=
|
109
|
+
columns_accessor :columns
|
116
110
|
|
117
111
|
# include list header on refresh
|
118
112
|
attr_accessor :refresh_with_header
|
@@ -36,6 +36,7 @@ module ActiveScaffold::Config
|
|
36
36
|
# instance-level configuration
|
37
37
|
# ----------------------------
|
38
38
|
|
39
|
+
columns_accessor :columns
|
39
40
|
# provides access to the list of columns specifically meant for the Search to use
|
40
41
|
def columns
|
41
42
|
# we want to delay initializing to the @core.columns set for as long as possible. Too soon and .search_sql will not be available to .searchable?
|
@@ -45,8 +46,6 @@ module ActiveScaffold::Config
|
|
45
46
|
@columns
|
46
47
|
end
|
47
48
|
|
48
|
-
public :columns=
|
49
|
-
|
50
49
|
# A flag for how the search should do full-text searching in the database:
|
51
50
|
# * :full: LIKE %?%
|
52
51
|
# * :start: LIKE ?%
|
@@ -14,12 +14,6 @@ module ActiveScaffold::Config
|
|
14
14
|
# the label for this action. used for the header.
|
15
15
|
attr_writer :label
|
16
16
|
|
17
|
-
|
18
|
-
def columns
|
19
|
-
self.columns = @core.columns._inheritable unless @columns # lazy evaluation
|
20
|
-
@columns
|
21
|
-
end
|
22
|
-
|
23
|
-
public :columns=
|
17
|
+
columns_accessor :columns
|
24
18
|
end
|
25
19
|
end
|
@@ -16,21 +16,6 @@ module ActiveScaffold::Config
|
|
16
16
|
|
17
17
|
attr_accessor :layout
|
18
18
|
|
19
|
-
|
20
|
-
def columns
|
21
|
-
# we want to delay initializing to the @core.update.columns set for as long as possible. but we have to eventually clone, or else have a configuration "leak"
|
22
|
-
unless @columns
|
23
|
-
if @core.actions.include? :update
|
24
|
-
@columns = @core.update.columns.clone
|
25
|
-
@columns.action = self
|
26
|
-
else
|
27
|
-
self.columns = @core.columns._inheritable
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
@columns
|
32
|
-
end
|
33
|
-
|
34
|
-
public :columns=
|
19
|
+
columns_accessor :columns, :copy => :update
|
35
20
|
end
|
36
21
|
end
|
@@ -16,6 +16,7 @@ module ActiveScaffold
|
|
16
16
|
|
17
17
|
def config_active_scaffold_delayed
|
18
18
|
return unless @active_scaffold_delayed
|
19
|
+
@_prefixes = nil # clean prefixes in case is already cached, so our local_prefixes override is picked up
|
19
20
|
block, @active_scaffold_delayed = @active_scaffold_delayed, nil
|
20
21
|
block.call
|
21
22
|
end
|
@@ -67,7 +67,7 @@ module ActiveScaffold
|
|
67
67
|
# otherwise, match them based on the foreign_key
|
68
68
|
when 0
|
69
69
|
if assoc.foreign_key.is_a? Array
|
70
|
-
next unless assoc.foreign_key
|
70
|
+
next unless assoc.foreign_key == foreign_key
|
71
71
|
else
|
72
72
|
next unless assoc.foreign_key.to_sym == foreign_key.to_sym
|
73
73
|
end
|
@@ -349,6 +349,7 @@ module ActiveScaffold
|
|
349
349
|
end
|
350
350
|
html_options.merge!(column.options[:html_options] || {})
|
351
351
|
options.merge!(column.options)
|
352
|
+
html_options[:name] = "#{html_options[:name]}[]" if html_options[:multiple] == true && !html_options[:name].to_s.ends_with?('[]')
|
352
353
|
active_scaffold_translate_select_options(options)
|
353
354
|
select(:record, column.name, options_for_select, options, html_options)
|
354
355
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Many, see README
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brakeman
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '>='
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - '>='
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
name: rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - '>='
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 3.2.18
|
48
48
|
- - <
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - '>='
|
55
|
+
- - ! '>='
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: 3.2.18
|
58
58
|
- - <
|
@@ -62,28 +62,28 @@ dependencies:
|
|
62
62
|
name: rubocop
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - '>='
|
65
|
+
- - ! '>='
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - '>='
|
72
|
+
- - ! '>='
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: shoulda
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - '>='
|
79
|
+
- - ! '>='
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '0'
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - '>='
|
86
|
+
- - ! '>='
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
description: Save time and headaches, and create a more easily maintainable set of
|
@@ -448,17 +448,17 @@ require_paths:
|
|
448
448
|
- lib
|
449
449
|
required_ruby_version: !ruby/object:Gem::Requirement
|
450
450
|
requirements:
|
451
|
-
- - '>='
|
451
|
+
- - ! '>='
|
452
452
|
- !ruby/object:Gem::Version
|
453
453
|
version: '1.9'
|
454
454
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
455
455
|
requirements:
|
456
|
-
- - '>='
|
456
|
+
- - ! '>='
|
457
457
|
- !ruby/object:Gem::Version
|
458
458
|
version: '0'
|
459
459
|
requirements: []
|
460
460
|
rubyforge_project:
|
461
|
-
rubygems_version: 2.4.
|
461
|
+
rubygems_version: 2.4.4
|
462
462
|
signing_key:
|
463
463
|
specification_version: 4
|
464
464
|
summary: Rails 3.2, 4.0, 4.1 and 4.2 versions of ActiveScaffold supporting prototype
|