
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
At the current time input_calendar is optimized for calendars that stay in place and are used in place (how I usually prefer a calendar in apps). No reason it couldn't be enhanced to hide/show dynamically and support visible date fields.
Interesting in patches to make it more configurable as long as it stays simple and elegant.
Here is what it looks like with the default CSS:
In your view:
<% form_for @event do |f| %>
<%= f.hidden_field :date, :class => "calendar" %>
<%= javascript_tag "Calendar.attach('event_date', {class: 'mycustomcssclass'})" %>
<% end %>
Or avoid the inline JS with some jQuery (coffeescript) somewhere:
$(document).ready ->
$("input.calendar").each (i, o) ->
Calendar.attach(o)
Example of using footer:
Calendar.attach("event_date", {footer: "<strong>Due by:</strong> <%= month %> <%= day %>, <%= year %>"})
Requires jQuery and underscore.js.
You'll need to add input_calendar to your Gemfile and then the asset pipeline will see that the appropriate JS and CSS files are included in your app.
Add to your Gemfile:
gem "input_calendar"
And install:
bundle install
A rake task is included to copy the JS and CSS files into your public folder.
Add to your Gemfile:
gem "input_calendar"
Then copy the files locally:
bundle install
bundle exec rake input_calendar:copy_files
Should give you:
create public/javascripts/input_calendar.js
create public/stylesheets/input_calendar.css
TODO: Add directions here.
FAQs
Unknown package
We found that input_calendar 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.