Skip to main content

ActionText and Globalize error

Rails • Asked by Alexey Poimtsev

I have application which is using globalize gem and i planning to start using ActionText. So, for example i have model called Business

class Business < ApplicationRecord
  translates :name, :description

  has_rich_text :description

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

    - 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 but this solution looks little bit strange :(

Hi Alexey,
Did you find any solution for this? I am getting the same error.
I added description to the tranlsation table as text.


Not yet :( I paused this task and started working on another issue. Will back with (i hope) a solution soon

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.