Trix rich_text_area form field doesn't clear on submit when containing an image

6 views
Skip to first unread message

fugee ohu

unread,
Jan 23, 2020, 1:43:16 PM1/23/20
to Ruby on Rails: Talk
If this form contains an image the rich_text_area field doesn't clear because I'm calling    
ActionCable.server.broadcast 'room_channel', content: @message.content, msg_time: Time.now, recipients: @message.recipients, sender: @message.sender, sender_name: User.find(@message.sender).name


<%= form_with model: @message, multipart: true, remote: true do |f| %>
    <%= f.rich_text_area :content, class: 'form-control' %>
    <%= f.hidden_field :recipients, value: @conversation_with.id %>
    <%= f.hidden_field :sender, value: current_user.id %>
    <%= f.submit 'Send' %>
<% end %>

Reply all
Reply to author
Forward
0 new messages