Sha256: ce8cd34624a58cb49bda2ef79e7c9c275b1c4cfca428004993c0ede7a6cd0fd6

Contents?: true

Size: 977 Bytes

Versions: 3

Compression:

Stored size: 977 Bytes

Contents

<% resource = (@_effective_resource || Effective::Resource.new(controller_path)) %>
<% @resource = instance_variable_get('@' + resource.name) if resource.name %>

<% if local_assigns[:html_template].present? %>
  EffectiveForm.remote_form_payload = "<%= j(render_resource_partial(@resource, action: action)) %>";
<% else %>
  EffectiveForm.remote_form_payload = "<%= j(render_resource_form(@resource, action: action, safe: true).presence || render_resource_partial(@resource)) %>";
<% end %>

EffectiveForm.remote_form_commit = "<%= params[:commit] %>";
EffectiveForm.remote_form_flash = <%= raw flash.to_json %>;

<% if !request.get? %>
  EffectiveForm.remote_form_redirect = "<%= local_assigns[:remote_form_redirect] %>";
<% end %>

<% if !request.get? && @resource.respond_to?(:refresh_datatables) && @resource.refresh_datatables.present? %>
  EffectiveForm.remote_form_refresh_datatables = <%= raw Array(@resource.refresh_datatables).uniq.compact.map(&:to_s) %>;
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
effective_resources-2.9.5 app/views/application/member_action.js.erb
effective_resources-2.9.4 app/views/application/member_action.js.erb
effective_resources-2.9.3 app/views/application/member_action.js.erb