Skip to content

Commit

Permalink
Status update in Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fabn committed Jul 9, 2015
1 parent 213150d commit ec73a8b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ active_admin_translates :title, :description do
validates_presence_of :title
end
```
## Editor configuration
## In your Active Admin resource definition

**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
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.

```ruby

Expand All @@ -41,6 +44,7 @@ index do
default_actions
end

# This was the original syntax proposed in this gem, however currently it doesn't work
form do |f|
# ...
f.translated_inputs "Translated fields", switch_locale: false do |t|
Expand All @@ -49,6 +53,20 @@ form do |f|
end
# ...
end

# Instead you have to nest the block inside an #inputs block and the title
# should be passed to the inputs method
form do |f|
# ...
f.inputs "Translated fields" do
f.translated_inputs 'ignored title', switch_locale: false do |t|
t.input :title
t.input :content
end
end
# ...
end

```
If `switch_locale` is set, each tab will be rendered switching locale.

Expand Down

0 comments on commit ec73a8b

Please sign in to comment.