<% content_for :javascript_includes do %> <%= javascript_include_tag "/assets/ckeditor/ckeditor" %> <% end %> <%= simple_form_for [:admin, @place], wrapper: :horizontal_form, wrapper_mappings: { file: :horizontal_file } do |f| %> <%= f.error_notification %> <%= f.input :name %> <%= f.input :address %> <%= f.input :url %>
e.g www.google.com (without http://)
<%= f.input :image, as: :file %>
please upload image with size 600px x 400px (width x height)
<%= f.input :description, as: :ckeditor, input_html: { ckeditor: { toolbar: 'Full' } } %> <%= f.input :page, :as => :hidden, :input_html => { :value => params[:page] || 1 } %>
<%= f.button :submit, class: "btn-primary" %> <%= link_to "Cancel", admin_places_path(:page => params[:page]), class: "btn btn-outline-secondary" %>
<% end %>