{"id":15151816,"url":"https://github.com/blocknotes/activeadmin_selectize","last_synced_at":"2025-09-29T21:31:12.211Z","repository":{"id":50083173,"uuid":"91958060","full_name":"blocknotes/activeadmin_selectize","owner":"blocknotes","description":"Selectize.js for ActiveAdmin","archived":true,"fork":false,"pushed_at":"2024-04-18T14:56:04.000Z","size":147,"stargazers_count":24,"open_issues_count":6,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-22T16:24:00.560Z","etag":null,"topics":["activeadmin","activeadmin-plugin","rails","rails5","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blocknotes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["blocknotes"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2017-05-21T13:11:52.000Z","updated_at":"2024-04-18T14:58:13.000Z","dependencies_parsed_at":"2024-04-18T15:59:08.990Z","dependency_job_id":"1e8c83f2-5f2d-4ace-801e-998c13713656","html_url":"https://github.com/blocknotes/activeadmin_selectize","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":"0.43999999999999995","last_synced_commit":"cc4129a00867b0b19d912261f10fbace8b2b4b6e"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_selectize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_selectize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_selectize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_selectize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blocknotes","download_url":"https://codeload.github.com/blocknotes/activeadmin_selectize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234665628,"owners_count":18868570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activeadmin","activeadmin-plugin","rails","rails5","ruby"],"created_at":"2024-09-26T15:22:10.292Z","updated_at":"2025-09-29T21:31:11.658Z","avatar_url":"https://github.com/blocknotes.png","language":"Ruby","readme":"# PROJECT UNMAINTAINED\n\n\u003e *This project is not maintained anymore*\n\u003e\n\u003e *If you like it or continue to use it fork it please.*\n\n---\n\n# ActiveAdmin Selectize\n[![gem version](https://badge.fury.io/rb/activeadmin_selectize.svg)](https://badge.fury.io/rb/activeadmin_selectize) [![gem downloads](https://badgen.net/rubygems/dt/activeadmin_selectize)](https://rubygems.org/gems/activeadmin_selectize) [![linters](https://github.com/blocknotes/activeadmin_selectize/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/activeadmin_selectize/actions/workflows/linters.yml) [![specs](https://github.com/blocknotes/activeadmin_selectize/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/activeadmin_selectize/actions/workflows/specs.yml)\n\nAn Active Admin plugin to use [Selectize.js](http://selectize.github.io/selectize.js) (jQuery required).\n\nFeatures:\n- nice select inputs;\n- items search;\n- AJAX content loading;\n- improve many-to-many / one-to-many selection.\n\n## Install\n\n- Add to your Gemfile:\n`gem 'activeadmin_selectize'`\n- Execute bundle\n- Add at the end of your ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):\n`@import 'activeadmin/selectize_input';`\n- Add at the end of your ActiveAdmin javascripts (_app/assets/javascripts/active_admin.js_):\n```css\n//= require activeadmin/selectize/selectize\n//= require activeadmin/selectize_input\n```\n- Use the input with `as: :selectize` in Active Admin model conf\n\nWhy 2 separated scripts? In this way you can include a different version of Selectize.js if you like.\n\n## Examples\n\nExample 1: an Article model with a many-to-many relation with Tag model:\n\n```ruby\nclass Article \u003c ApplicationRecord\n  has_and_belongs_to_many :tags\n  accepts_nested_attributes_for :tags\nend\n```\n\n```ruby\n# ActiveAdmin article form conf:\n  form do |f|\n    f.inputs 'Article' do\n      f.input :title\n      f.input :description\n      f.input :published\n      f.input :tags, as: :selectize, collection: f.object.tags, input_html: { 'data-opt-remote': admin_tags_path( format: :json ), 'data-opt-text': 'name', 'data-opt-value': 'id', 'data-opt-highlight': 'true', placeholder: 'Search a tag...' }\n    end\n    f.actions\n  end\n```\n\nExample 2: using selectize in filters:\n\n```ruby\n# Without remote items (no AJAX):\nfilter :name_eq, as: :selectize, collection: Author.all.pluck( :name, :name )\n# With remote items:\nfilter :tags_id_eq, as: :selectize, collection: [], input_html: { 'data-opt-remote': '/admin/tags.json', 'data-opt-text': 'name', 'data-opt-value': 'id', 'data-opts': '{\"dropdownParent\":\"body\"}', placeholder: 'Search a tag...' }\n```\n\n## Notes\n\n- In ActiveAdmin json routes should be enabled by default, this behavior is controlled by *download_links* option for index action. Example:\n\n```rb\nindex download_links: [:csv, :json] do\n  # ...\nend\n```\n\nYou can customize the JSON response overriding the *as_json* method of the model:\n\n```rb\ndef as_json( options = nil )\n  super({ only: [:id], methods: [:fullname] }.merge(options || {}))\nend\n```\n\n- If the select items \"gets cut\" by the container try adding: `'data-opts': '{\"dropdownParent\":\"body\"}'`\n\n- Alternative syntax to pass data attributes: `input_html: { data: { opts: '{}' } }`\n\n- To use this plugins with ActiveAdmin 1.x please use the version 0.1.6\n\n## Options\n\nPass the required options using `input_html`.\n\n- **data-opt-remote**: URL used for AJAX search requests (method GET)\n- **data-opt-text**: field to use as option label\n- **data-opt-value**: field to use as select value\n- **data-opt-NAME**: option _NAME_ passed directly to Selectize.js - see [options](https://github.com/selectize/selectize.js/blob/master/docs/usage.md#configuration)\n\nAlternative syntax:\n\n- **data-opts**: overrides Selectize options - example: `'data-opts': '{\"highlight\":true,\"plugins\":[]}'`\n\n## Do you like it? Star it!\n\nIf you use this component just star it. A developer is more motivated to improve a project when there is some interest. My other [Active Admin components](https://github.com/blocknotes?utf8=✓\u0026tab=repositories\u0026q=activeadmin\u0026type=source).\n\nOr consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me).\n\n## Contributors\n\n- [Mattia Roccoberton](http://blocknot.es): author\n\n## License\n\n[MIT](LICENSE.txt)\n","funding_links":["https://github.com/sponsors/blocknotes"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocknotes%2Factiveadmin_selectize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblocknotes%2Factiveadmin_selectize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocknotes%2Factiveadmin_selectize/lists"}