Coder Social home page Coder Social logo

gabrieletassoni / rails_admin_selectize Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 134 KB

Use Selectize.js as an alternative Field for your has_many :through associations in Rails Admin

License: MIT License

Ruby 59.79% JavaScript 0.73% SCSS 0.63% Haml 38.85%

rails_admin_selectize's Introduction

RailsAdminSelectize

The default multiselect widget for create and edit forms in Rails Admin is useful, for sure, but some of my customers find it a bit unpleasant to the eyes. Chatting around with some of them I found they expected, for multi select an approach similar to the normal select, a more streamlined and small element in the page. Since I used, some time ago, the selectize.js library, and found it to be full with options and beautiful, I started to look around and find a selectize custom field for Rails Admin, what I found is this rails_admin_selectize, but soon I noticed it was completely abandoned and targeted at very old versions of rails admin, not working in newer versions by just changing the dependency, so I decided to start from scratch and integrate the selectize into the Rails Admin environment one step at a time.

This Rails Admin Custom Field is not a fully custimizable selectize implementation, rathere a really straight forward one, aimed at using a selectize Field the KISSier way. I will maintain this and probably add some of the configurations from time to time, when needs arises in one of my future commissions, the code is kept KISS as more as I can, open to further implementations.

Usage

Just add :selectize to a field configuration or definition in a rails admin model.

configure :has_many_through_association_field_name, :selectize

Installation

Add this line to your application's Gemfile:

gem 'rails_admin_selectize'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails_admin_selectize

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.