Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
blocknotes committed Sep 17, 2020
1 parent c1c7154 commit 7b48f8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ActiveAdmin Dynamic Fields [![Gem Version](https://badge.fury.io/rb/activeadmin_dynamic_fields.svg)](https://badge.fury.io/rb/activeadmin_dynamic_fields) [![CircleCI](https://circleci.com/gh/blocknotes/activeadmin_dynamic_fields.svg?style=svg)](https://circleci.com/gh/blocknotes/activeadmin_dynamic_fields)

An Active Admin plugin to add dynamic behaviors to fields.
An Active Admin plugin to add dynamic behaviors to some fields.

Features:
- set conditional checks on fields
- trigger some actions on other fields
- trigger actions on target elements
- inline field editing
- create links to load some content in a dialog

Expand All @@ -14,7 +14,10 @@ The easiest way to show how this plugin works is looking the examples [below](#e
- Add to your Gemfile: `gem 'activeadmin_dynamic_fields'`
- Execute bundle
- Add at the end of your ActiveAdmin javascripts (_app/assets/javascripts/active_admin.js_):
`//= require activeadmin/dynamic_fields`

```js
//= require activeadmin/dynamic_fields
```

## Options
Options are passed to fields using *input_html* parameter as *data* attributes:
Expand All @@ -38,6 +41,8 @@ Options are passed to fields using *input_html* parameter as *data* attributes:
- **data-function**: check the return value of a custom function
- **data-arg**: argument passed to the custom set function (as array of strings)

A check condition or a custom check function are required. A trigger action is required too, unless you are using a custom function (in that case it is optional).

## Examples

### Dynamic fields examples
Expand Down
2 changes: 1 addition & 1 deletion lib/activeadmin/dynamic_fields/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module ActiveAdmin
module DynamicFields
VERSION = '0.2.10'
VERSION = '0.3.0'
end
end

0 comments on commit 7b48f8a

Please sign in to comment.