Ruby on Rails form with select2-rails input element search behavior is case sensitive





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















The following code presents a pillbox style selection element in a form that returns a valid list of values, but the search is case sensitive:



<%= hidden_field_tag "notification[:equips_ids]", nil %>
<input name="notification[equip_ids]" type="hidden" value="" />
<select multiple="multiple" class="custom-select select2" name="notification[equip_ids]" id="notification_equip_ids">
<% !@notification.new.record? %>
<% @notification.equips.each do |equip| %>
<option selected="selected" value="<%= equip.equip_id %>"><%= equip.equip_info %></option>
<% end %>
</select>


I have studied the Select2 documentation, Ruby on Rails helper classes, my own code, this forum, examined my UI elements with Developer Tools, and searched Google with as many different search terms as I could think up. Any idea how I can make the selection case insensitive?
Thank you for your time - I hope I finally figured out how to ask a decent question. I sure don't want to lose the privilege!










share|improve this question























  • hmm, strange. my select2 with multiple implementations are not case-sensitive. are you using the latest version of select2?

    – Cody Caughlan
    Nov 22 '18 at 1:44


















0















The following code presents a pillbox style selection element in a form that returns a valid list of values, but the search is case sensitive:



<%= hidden_field_tag "notification[:equips_ids]", nil %>
<input name="notification[equip_ids]" type="hidden" value="" />
<select multiple="multiple" class="custom-select select2" name="notification[equip_ids]" id="notification_equip_ids">
<% !@notification.new.record? %>
<% @notification.equips.each do |equip| %>
<option selected="selected" value="<%= equip.equip_id %>"><%= equip.equip_info %></option>
<% end %>
</select>


I have studied the Select2 documentation, Ruby on Rails helper classes, my own code, this forum, examined my UI elements with Developer Tools, and searched Google with as many different search terms as I could think up. Any idea how I can make the selection case insensitive?
Thank you for your time - I hope I finally figured out how to ask a decent question. I sure don't want to lose the privilege!










share|improve this question























  • hmm, strange. my select2 with multiple implementations are not case-sensitive. are you using the latest version of select2?

    – Cody Caughlan
    Nov 22 '18 at 1:44














0












0








0








The following code presents a pillbox style selection element in a form that returns a valid list of values, but the search is case sensitive:



<%= hidden_field_tag "notification[:equips_ids]", nil %>
<input name="notification[equip_ids]" type="hidden" value="" />
<select multiple="multiple" class="custom-select select2" name="notification[equip_ids]" id="notification_equip_ids">
<% !@notification.new.record? %>
<% @notification.equips.each do |equip| %>
<option selected="selected" value="<%= equip.equip_id %>"><%= equip.equip_info %></option>
<% end %>
</select>


I have studied the Select2 documentation, Ruby on Rails helper classes, my own code, this forum, examined my UI elements with Developer Tools, and searched Google with as many different search terms as I could think up. Any idea how I can make the selection case insensitive?
Thank you for your time - I hope I finally figured out how to ask a decent question. I sure don't want to lose the privilege!










share|improve this question














The following code presents a pillbox style selection element in a form that returns a valid list of values, but the search is case sensitive:



<%= hidden_field_tag "notification[:equips_ids]", nil %>
<input name="notification[equip_ids]" type="hidden" value="" />
<select multiple="multiple" class="custom-select select2" name="notification[equip_ids]" id="notification_equip_ids">
<% !@notification.new.record? %>
<% @notification.equips.each do |equip| %>
<option selected="selected" value="<%= equip.equip_id %>"><%= equip.equip_info %></option>
<% end %>
</select>


I have studied the Select2 documentation, Ruby on Rails helper classes, my own code, this forum, examined my UI elements with Developer Tools, and searched Google with as many different search terms as I could think up. Any idea how I can make the selection case insensitive?
Thank you for your time - I hope I finally figured out how to ask a decent question. I sure don't want to lose the privilege!







ruby-on-rails select2-rails






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 '18 at 1:39









Jennifer Mansker-BickelJennifer Mansker-Bickel

276




276













  • hmm, strange. my select2 with multiple implementations are not case-sensitive. are you using the latest version of select2?

    – Cody Caughlan
    Nov 22 '18 at 1:44



















  • hmm, strange. my select2 with multiple implementations are not case-sensitive. are you using the latest version of select2?

    – Cody Caughlan
    Nov 22 '18 at 1:44

















hmm, strange. my select2 with multiple implementations are not case-sensitive. are you using the latest version of select2?

– Cody Caughlan
Nov 22 '18 at 1:44





hmm, strange. my select2 with multiple implementations are not case-sensitive. are you using the latest version of select2?

– Cody Caughlan
Nov 22 '18 at 1:44












2 Answers
2






active

oldest

votes


















0














This issue was fixed in select2 version 4.0.6 but the problem that select2-rails is using select2 4.0.3 which is an older version and it doesn't contain the fixes for your problem:
enter image description here



Reference:
https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
https://github.com/argerim/select2-rails



You have 2 options:

1) Create an issue on select2-rails & ask them to migrate select2 to the latest version or you may contribute as well.



OR



2) To fix this issue manually, get latest JS files from select2 & overwrite your local files (but be careful when you are running bundle as the fixes may be overwritten by bundler in case a new version has been issued by select2-rails). Also, you can add the fixes in the tag.js file as below:
https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
enter image description here






share|improve this answer































    0














    Confirmed, the version installed is 4.0.3, update version to 4.0.6 will be attempted.



    Thank you for your assistance!






    share|improve this answer
























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422764%2fruby-on-rails-form-with-select2-rails-input-element-search-behavior-is-case-sens%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      This issue was fixed in select2 version 4.0.6 but the problem that select2-rails is using select2 4.0.3 which is an older version and it doesn't contain the fixes for your problem:
      enter image description here



      Reference:
      https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
      https://github.com/argerim/select2-rails



      You have 2 options:

      1) Create an issue on select2-rails & ask them to migrate select2 to the latest version or you may contribute as well.



      OR



      2) To fix this issue manually, get latest JS files from select2 & overwrite your local files (but be careful when you are running bundle as the fixes may be overwritten by bundler in case a new version has been issued by select2-rails). Also, you can add the fixes in the tag.js file as below:
      https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
      enter image description here






      share|improve this answer




























        0














        This issue was fixed in select2 version 4.0.6 but the problem that select2-rails is using select2 4.0.3 which is an older version and it doesn't contain the fixes for your problem:
        enter image description here



        Reference:
        https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
        https://github.com/argerim/select2-rails



        You have 2 options:

        1) Create an issue on select2-rails & ask them to migrate select2 to the latest version or you may contribute as well.



        OR



        2) To fix this issue manually, get latest JS files from select2 & overwrite your local files (but be careful when you are running bundle as the fixes may be overwritten by bundler in case a new version has been issued by select2-rails). Also, you can add the fixes in the tag.js file as below:
        https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
        enter image description here






        share|improve this answer


























          0












          0








          0







          This issue was fixed in select2 version 4.0.6 but the problem that select2-rails is using select2 4.0.3 which is an older version and it doesn't contain the fixes for your problem:
          enter image description here



          Reference:
          https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
          https://github.com/argerim/select2-rails



          You have 2 options:

          1) Create an issue on select2-rails & ask them to migrate select2 to the latest version or you may contribute as well.



          OR



          2) To fix this issue manually, get latest JS files from select2 & overwrite your local files (but be careful when you are running bundle as the fixes may be overwritten by bundler in case a new version has been issued by select2-rails). Also, you can add the fixes in the tag.js file as below:
          https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
          enter image description here






          share|improve this answer













          This issue was fixed in select2 version 4.0.6 but the problem that select2-rails is using select2 4.0.3 which is an older version and it doesn't contain the fixes for your problem:
          enter image description here



          Reference:
          https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
          https://github.com/argerim/select2-rails



          You have 2 options:

          1) Create an issue on select2-rails & ask them to migrate select2 to the latest version or you may contribute as well.



          OR



          2) To fix this issue manually, get latest JS files from select2 & overwrite your local files (but be careful when you are running bundle as the fixes may be overwritten by bundler in case a new version has been issued by select2-rails). Also, you can add the fixes in the tag.js file as below:
          https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd
          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 3:10









          ShikoShiko

          1,4981225




          1,4981225

























              0














              Confirmed, the version installed is 4.0.3, update version to 4.0.6 will be attempted.



              Thank you for your assistance!






              share|improve this answer




























                0














                Confirmed, the version installed is 4.0.3, update version to 4.0.6 will be attempted.



                Thank you for your assistance!






                share|improve this answer


























                  0












                  0








                  0







                  Confirmed, the version installed is 4.0.3, update version to 4.0.6 will be attempted.



                  Thank you for your assistance!






                  share|improve this answer













                  Confirmed, the version installed is 4.0.3, update version to 4.0.6 will be attempted.



                  Thank you for your assistance!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 28 '18 at 22:41









                  Jennifer Mansker-BickelJennifer Mansker-Bickel

                  276




                  276






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422764%2fruby-on-rails-form-with-select2-rails-input-element-search-behavior-is-case-sens%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Guess what letter conforming each word

                      Port of Spain

                      Run scheduled task as local user group (not BUILTIN)