I have application which is using globalize gem and i planning to start using ActionText. So, i have model called Business
class Business < ApplicationRecord
translates :name, :description
globalize_accessors
has_rich_text :description
end
and i created an record in database. But on attempt to edit i see following error
undefined method `body' for "<div><strong>jfgjwhgewr</strong></div>":String
for my form
.form-inputs
- I18n.available_locales.each do |locale|
= f.input :"name_#{locale.to_s}", label: "Name (#{locale.to_s})"
- I18n.available_locales.each do |locale|
= f.label "Description (#{locale.to_s})"
= f.rich_text_area :"description_#{locale.to_s}"
Whats wrong with it and how can i solve this issue?
PS: I found https://github.com/rails/actiontext/issues/32#issuecomment-450653800 but this solution looks little bit strange :(