usando la gema ckeditor con el atributo anidado de rieles

Has anyone been able to use the ckeditor gem (https://github.com/galetahub/ckeditor/issues/98) attached to a form builder object in a nested form?

Archivo de gemas:

gem 'rails', '3.2.1'
....
gem "nested_form"
gem "ckeditor", "3.7.0.rc3"

I extracted the problem to a very simple nested forms application, i.e.

post.rb:

has_many :comments
accepts_nested_attributes_for :comments

So I try to use the ckeditor to edit comments. The view looks like this:

<%= nested_form_for(@post) do |f| %>

<%= f.label :post_content %>

<%= f.text_area :post_content %>
<%= f.fields_for :comments do |cf| %>
<%= cf.cktext_area :comment_content %>
<% end %>
....

A normal text area appears for the comment content. If I switch the "f.text_area" in the post part of the form to "f.cktext_area" the ckeditor appears for the post content.

No errors appear in the log when the form is rendered.

¿Me estoy perdiendo algo?

preguntado el 10 de marzo de 12 a las 01:03

1 Respuestas

did you generate ckeditor files with:

rails generate ckeditor:models --orm=active_record --backend=paperclip

Respondido el 29 de junio de 12 a las 17:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.