🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

simple_form_bootstrap_inputs

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple_form_bootstrap_inputs

bundlerRubyGems.org
Version
0.1.0
Version published
Maintainers
2
Created
Source

SimpleFormBootstrapInputs

Установка

gem 'simple_form_bootstrap_inputs', github: 'BrandyMint/simple_form_bootstrap_inputs'
$ bundle

Необходим bootstrap и bootstrap-datetimepicker
В application.js:
//= require bootstrap
//= require bootstrap-datetimepicker

document.addEventListener("turbolinks:load", function() {
  $('div.datetimepicker').datetimepicker({ locale: 'ru', format: 'DD-MM-YYYY' });
});

Использование

Пример

= simple_form_for model do |f|
  = f.input :date, as: 'simple_form_bootstrap_inputs/date_picker'
  = f.input :currency, as: 'simple_form_bootstrap_inputs/currency'
  = f.input :datetime, as: 'simple_form_bootstrap_inputs/datetime_picker'
...

date - дата по умолчанию в формате: 'YYYY-MM-DD'
date
datetime - дата и время в формате: 'YYYY-MM-DD' + ' ' + 'HH:mm'
datetime
currency:
у model должны быть 2 аттрибута, например - value и value_currency - string
currency

FAQs

Package last updated on 10 Dec 2018

Did you know?

Socket

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.

Install

Related posts