Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

Commit ec73a8b

Browse files
committed
Status update in Readme
1 parent 213150d commit ec73a8b

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ active_admin_translates :title, :description do
2525
validates_presence_of :title
2626
end
2727
```
28-
## Editor configuration
28+
## In your Active Admin resource definition
29+
30+
**Important note:** I'm working on a fix for #4 because after AA deprecated and then removed [#form_buffers](https://github.com/activeadmin/activeadmin/pull/3486) the
31+
syntax shown below for form declaration doesn't work as is. See comments in code and [discussion](#4) to fix it until I found a solution.
2932

3033
```ruby
3134

@@ -41,6 +44,7 @@ index do
4144
default_actions
4245
end
4346

47+
# This was the original syntax proposed in this gem, however currently it doesn't work
4448
form do |f|
4549
# ...
4650
f.translated_inputs "Translated fields", switch_locale: false do |t|
@@ -49,6 +53,20 @@ form do |f|
4953
end
5054
# ...
5155
end
56+
57+
# Instead you have to nest the block inside an #inputs block and the title
58+
# should be passed to the inputs method
59+
form do |f|
60+
# ...
61+
f.inputs "Translated fields" do
62+
f.translated_inputs 'ignored title', switch_locale: false do |t|
63+
t.input :title
64+
t.input :content
65+
end
66+
end
67+
# ...
68+
end
69+
5270
```
5371
If `switch_locale` is set, each tab will be rendered switching locale.
5472

0 commit comments

Comments
 (0)