
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
= Select Options
This gem creates a select tag and a series of contained option tags for the provided object and method.
Helper takes options from model's constant and translates it according to the translations file (composite_attributes
section).
= Installation
In Gemfile: gem 'select_options'
= Usage example
For example, you have a model User with the field role and a constant ROLES: class User < ActiveRecord::Base ROLES = %w(admin user) ... end
in the template you have just write: <%= f.select_with_options :role %>
In case if you have the constant, named differt from the field name, like this: class Shape < ActiveRecord::Base DIMENTION_VALUES = [2, 3] ... end in the template you should use option :source <%= f.select_with_options :dimention, :source => Shape::DIMENTION_VALUES %>
Translations in en.yml for an ActiveRecord child look like this: en: activerecord: composite_attributes: user: role: admin: Administrator user: User or like this: en: activerecord: attributes: shape: dimention_2: 2D dimention_3: 3D
This code will generate translated collection of options for select tag: Administrator User
== Copyright
Copyright (c) 2011 Dmitriy Vorotilin, {Evrone.com}[http://evrone.com]. See LICENSE.txt for further details.
FAQs
Unknown package
We found that select_options 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’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
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.