Sha256: 1ecb02e7077da0c7a2c85073c70f05b729c0efd384ca143a7bcd68f8ed0500fe

Contents?: true

Size: 765 Bytes

Versions: 1

Compression:

Stored size: 765 Bytes

Contents

// Routes JS
<% url = Rails.application.routes.url_helpers %>
window.FormilyRoutes = {
  input_create_path: function(){
    // POST
    return "<%= url.formily_inputs_path %>";
  },
  input_update_path: function(id){
    // PUT
    return "<%= url.formily_input_path(0).to_s[0...-1] %>" + id.toString();
  },
  input_delete_path: function(id){
    // DELETE
    return "<%= url.formily_input_path(0).to_s[0...-1] %>" + id.toString();
  },
  form_preview_path: function(){
    //POST
    return "<%= url.preview_form_formily_forms_path %>";
  },
  form_file_path: function(id) {
    return "<%= url.formily_file_path(0).to_s[0...-1] %>" + id.toString();
  },
  form_upload_file_path: function () {
    return "<%= url.upload_file_formily_submit_data_path %>";
  }
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
formily-0.0.5.5.7 app/assets/javascripts/formily/formily_url.js.erb