
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Integrate with jQuery UI autocomplete library to provide select by autocomplete input and form helper.
Add this line to your application's Gemfile:
gem 'autocomplete_select'
And then execute:
bundle
Or install it yourself as:
gem install autocomplete_select
Make sure you required jQuery, jQuery UI and add the following to /app/assets/javascripts/application.js:
//= require autocomplete_select
Make sure you required jQuery UI css.
You have to implement a controller and action like this
class UsersController < ActionController::Base
def search
term = params[:term]
users = User.where("name LIKE ?", "%#{term}%")
render :json => users.map{ |user| {:value => user.id, :label => user.name}}
end
end
The input term
is what you type in textbox.
The output must be an array with value
and label
.
You can use autocomplete_select_tag
and autocomplete_select
.
<%= autocomplete_select_tag(name, search_path, value, autocomplete_options, html_options) %>
<%= autocomplete_select_tag(name, search_path, value, display, autocomplete_options, html_options) %>
<%= autocomplete_select_tag(:user_id, search_users_path, 1, 'username', {:minLength => 3}, {:class => 'user'}) %>
<%= autocomplete_select_tag(:user_id, search_users_path, 1, 'username') %>
<%= autocomplete_select_tag(:user_id, search_users_path) %>
or form builder
<% form_for @item do |f| %>
<%= f.autocomplete_select(method, search_path, autocomplete_options, html_options) %>
<%= f.autocomplete_select(method, search_path, display, autocomplete_options, html_options) %>
<%= f.autocomplete_select(:user_id, search_users_path, 'username', {:minLength => 3}, {:class => 'user'}) %>
<%= f.autocomplete_select(:user_id, search_users_path, 'username') %>
<%= f.autocomplete_select(:user_id, search_users_path) %>
<% end %>
The gem is available as open source under the terms of the MIT License.
The project's website is located at https://github.com/emn178/autocomplete_select
Author: Chen, Yi-Cyuan (emn178@gmail.com)
FAQs
Unknown package
We found that autocomplete_select demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.