RajeshM
RajeshM

Reputation: 872

Using Trix editor with Simple Form

I'm using the gem 'trix' for the Trix editor with Simple Form. This is what I did in my form:

<%= f.input :body, as: :trix_editor %>

and I get "No input found for trix_editor". The documentation for the gem only talks about using it with Formtastic. Any help will be appreciated.

Upvotes: 0

Views: 2319

Answers (2)

laurajaime
laurajaime

Reputation: 379

You can do it too:

<%= f.rich_text_area :body %>

Upvotes: 0

usha
usha

Reputation: 29349

Following should work

<%= f.trix_editor :body %>

Upvotes: 3

Related Questions