id and class


id and class - 

for id  - #

for class - .



   <div>

    <%= form.label :login, style: "display: block" %>

    <%= form.text_field :login,class: "ckeditor" %>

  </div>


  <div>

    <%= form.submit %>

  </div>

<% end %>

<script type="text/javascript">

  $('.ckeditor').ckeditor({

  // optional config

});

</script>

Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5