You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 lines
665 B

<%= content_tag :div, class: local_assigns[:class] do %>
<div class="trix__field">
<%- trix_id = f.object.new_record? ? (local_assigns[:child_index] ? "#{dom_id(f.object, attr)}_#{local_assigns[:child_index]}" :
"#{attr}_new_#{model_name_from_record_or_class(f.object).param_key.pluralize}" ) :
dom_id(f.object, attr) -%>
<%= f.label attr, local_assigns[:label], for: nil unless local_assigns[:skip_label] %>
<%= f.hidden_field attr, id: trix_id %>
<trix-editor input="<%= trix_id %>"></trix-editor>
</div>
<%- end -%>