Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
enhanced_date_select
Advanced tools
An enhanced date select form helper that allows you to use the full HTML specification for date_select helper methods from rails. This is more than what you get with the default Rails date select helper because it can allow values to persist in dropdowns even if you submit a invalid value.
Rails >= 4.0 only. MRI >= 2.2.0
JRuby is not offically supported.
We will accept further compatibilty pull-requests but no upcoming versions will be tested against it.
Rubinius support temporarily dropped due to Rails 4 incompatibility.
Type the following from the command line to install:
gem install enhanced_date_select
Add the following to your Gemfile:
gem "enhanced_date_select"
Use the enhanced_date_select instead of date_select helper methods in your views. Example:
form.enhanced_date_select :birthday,
{
:prompt =>
{
:day => "please select one",
:month => "please select one",
:year => "please select one"
},
:value =>
{
:year => @year,
:month => @month,
:day => @day
},
:order => [:day, :month, :year],
:start_year => Time.now.year,
:end_year => 1940
},
{
:class => "input_3cols"
}
...or alternatively:
form.enhanced_date_select :birthday,
{
:prompt =>
{
:day => "please select one",
:month => "please select one",
:year => "please select one"
},
:value => Date.new(2011,02,01),
:order => [:day, :month, :year],
:start_year => Time.now.year,
:end_year => 1940
},
{
:class => "input_3cols"
}
The enhanced_date_select takes all the standard options as the default Rails date_select method. The only difference is that it expects an hash with values for year, month and day instead of an date object.
To test, do the following:
Contributions
Please log all feedback/issues via Github Issues. Thanks.
Copyright (c) 2012 bogdanRada. See LICENSE.txt for further details.
FAQs
Unknown package
We found that enhanced_date_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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.