advanced_select 0.1.7 → 0.1.8
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0d986f80cf90e0dc2aa254d9eb0a9b8d76b844f205ae8ca86f815c1a5b17bea
|
|
4
|
+
data.tar.gz: 72722ff9f42bbed846afe1ec04e46362e9ec259d96c7bacb171207dd8ccbdc79
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d287e5b91c20d5dd629d55f802f1095fd2f016e3f4bdccff8f011fabf0e115914d56563ed00f5219a7a65452d1df4b143a4f2b3e5bf68b8ebb93898c83a7910d
|
|
7
|
+
data.tar.gz: 1b9d260a2ace0a2ec7d132581da98e35a09fc26265420655afa40ff290454b716584bb1cf5062a5ce2fa1a432cae22c1da75e411546b3673e88e468b4295910e
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
<%= render partial: "advanced_select/options", locals: {
|
|
96
96
|
target_id: target_id,
|
|
97
97
|
selected_options: selected_options,
|
|
98
|
-
options: advanced_select_options_for_render(options, selected_options, searchable),
|
|
98
|
+
options: advanced_select_options_for_render(options, selected_options, searchable, options_url),
|
|
99
99
|
multiple: multiple,
|
|
100
100
|
add_mode: add_mode,
|
|
101
101
|
query: nil,
|
|
@@ -116,8 +116,10 @@ module AdvancedSelect
|
|
|
116
116
|
tag.span(safe_join(content), class: advanced_select_class(class_map, :option_content))
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
-
def advanced_select_options_for_render(options, selected_options, searchable)
|
|
120
|
-
|
|
119
|
+
def advanced_select_options_for_render(options, selected_options, searchable, options_url)
|
|
120
|
+
return options unless searchable
|
|
121
|
+
|
|
122
|
+
options_url.present? ? selected_options.presence || options : options
|
|
121
123
|
end
|
|
122
124
|
|
|
123
125
|
def advanced_select_add_option?(options, selected_options, add_mode, query)
|