
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
administrate-field-select
Advanced tools
Adds basic select/dropdown fields to ThoughtBot's Administrate
NOTE: Since v0.1.15, Administrate now supports its own Field::Select with a slightly different mechanic. So this has been renamed to Field::SelectBasic. Please update your Gemfiles (as below) and rename your calls to this field.
Add this line to your application's Gemfile:
gem 'administrate-field-select', '~> 2.0', require: 'administrate/field/select_basic'
And then execute:
$ bundle
In your dashboard's ATRRIBUTE_TYPES
, use the type Field::SelectBasic
with options:
ATTRIBUTE_TYPES = {
my_field: Field::SelectBasic.with_options({
choices: ['option_one', 'option_two', 'option_three']
}),
some_other_field: Field::String,
}
The options specified in choices
will be passed as the choice to a Rails select
tag.
Additional options that are available:
include_blank
: If true or a string, includes a blank option in the dropdown (with the string as its text).prettify
: If true, passes all choices through titleize
before displaying them (in all views). If a lambda, that lambda is used instead of titleize
.i18n
: If true, passes all choices through i18n
before displaying them (in all views).If both prettify
and i18n
are specified then prettify
takes
precedence.
Some ideas for possible enhancements:
Bug reports and pull requests are welcome on GitHub at https://github.com/fishpercolator/administrate-field-select. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that administrate-field-select 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.