
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
rails-jquery-tokeninput
Advanced tools
Integrating Tokeninput jQuery plugin version 1.6.1.
Add this line to your application's Gemfile:
gem 'rails-jquery-tokeninput'
And then execute:
$ bundle
Require jquery.tokeninput.js in your application.js:
//= require rails-jquery-tokeninput
Add the stylesheets you want to use in your application.css:
*= require token-input-facebook
To start using gem you just have to add data-attribute to your text input:
names = [{ id: 1, name: 'John' }, { id: 2, name: 'Mike' }]
f.text_field :names, 'data-tokeninput' => { collection: names }.to_json
Or if you are using Simple Form or Formtastic it may looks like:
countries = [{ name: 'Hong Kong', iso_code: 'HK' }, { name: 'Jamaica', iso_code: 'JM' }]
options = { theme: 'facebook', tokenValue: 'iso_code' }
f.input :countries, as: :string, input_html: {
data: { tokeninput: { collection: countries, options: options } }
}
It will automatically pass input values to your controller like an array (works well with pg_array).
It also automatically pre populate existed items.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that rails-jquery-tokeninput demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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 News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.