Sha256: 4757ce0597c58ab2287725ad9d336b2a02d1f3722481bb82ffcda33e985166d5
Contents?: true
Size: 1.92 KB
Versions: 5
Compression:
Stored size: 1.92 KB
Contents
# Effective Bootstrap Everything you need to get set up with bootstrap 4. Bootstrap 4 component helpers and form building replacement. Bootstrap >= 4.0 Rails >= 5.1 ## Getting Started ```ruby gem 'effective_bootstrap' ``` Run the bundle command to install it: ```console bundle install ``` Install the configuration file: ```console rails generate effective_bootstrap:install ``` The generator will install an initializer which describes all configuration options. Make sure you have Bootstrap 4 installed: Your `application.js` should include ```ruby //= require jquery3 //= require popper //= require bootstrap ``` And `application.scss` should include ```sass @import 'bootstrap'; ``` ### Install All Form Inputs This gem packages the javascript/css assets for numerous form inputs. The assets for these inputs may be included all at once or individually. To install all available inputs, add the following to your application.js: ```ruby //= require effective_bootstrap ``` and add the following to your application.css: ```ruby @import 'effective_bootstrap'; ``` All of the included form inputs will now be available with no additional installation tasks. ### Options Passing to JavaScript All `:input_js => options` passed to any effective_form_input will be used to initialize the Javascript library For example: ```ruby = form_for @user do |f| = f.effective_date_time_picker :updated_at, :input_js => {:format => 'dddd, MMMM Do YYYY', :showTodayButton => true} ``` or ```ruby = simple_form_for @user do |f| = f.input :updated_at, :as => :effective_date_time_picker, :input_js => {:format => 'dddd, MMMM Do YYYY', :showTodayButton => true} ``` will result in the following call to the Javascript library: ```coffee $('input.effective_date_time_picker').datetimepicker format: 'dddd, MMMM Do YYYY', showTodayButton: true ``` Any options passed in this way will be used to initialize the underlying javascript libraries.
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
effective_bootstrap-0.0.5 | README.md |
effective_bootstrap-0.0.4 | README.md |
effective_bootstrap-0.0.3 | README.md |
effective_bootstrap-0.0.2 | README.md |
effective_bootstrap-0.0.1 | README.md |