Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.