Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bootstrap_colorpicker_rails

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap_colorpicker_rails

  • 1.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

BootstrapColorpickerRails

Gem Version Code Climate Dependency Status

This gem is Rails integration for Bootstrap Colorpicker. It includes simple_form input for Colorpicker.

Bootstrap Colorpicker originally written by Stefan Petre (@eyecon) and maintained in Github by Javier Aguilar (@mjolnic) and the community.

Note: This gem doesn't include Bootstrap itself, it inludes only Bootstrap Colorpicker. You can get Bootstrap here

Installation

Add this line to your application's Gemfile:

gem 'bootstrap_colorpicker_rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bootstrap_colorpicker_rails

Usage

Add stylesheet file to app/assets/stylesheets/application.css.scss

@import "bootstrap-colorpicker";

Add javascript file to app/assets/javascripts/application.js

//= require bootstrap-colorpicker

Using directly

Just call colorpicker() with any selector.

<input class='colorpicker'>

<script type="text/javascript">
  $(document).ready(function(){
    $('.colorpicker').colorpicker();
  })
</script>

There are some options you can pass to colorpicker(). They are documented at http://mjolnic.github.io/bootstrap-colorpicker/

Using with simple_form

There is simple_form input which you can apply via as: :colorpicker option.

<%= f.input :color, as: :colorpicker %>

Note: For simple_form version < '3.1.0' use this gem version '0.1.1'

Contributing

  1. Fork it ( https://github.com/ShPakvel/bootstrap_colorpicker_rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

This gem is licensed under the MIT License.
Bootstrap Colorpicker itself is licensed under the Apache License, Version 2.0.

FAQs

Package last updated on 12 Jan 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc