Skip to content

Instantly share code, notes, and snippets.

@dtakahas
Last active December 18, 2015 18:19
Show Gist options
  • Save dtakahas/5824879 to your computer and use it in GitHub Desktop.
Save dtakahas/5824879 to your computer and use it in GitHub Desktop.
<%= vpi_button_to_function @readonly ? "Close" : "Cancel", cancel_js, :class => 'vpi_submit_button' %>
<%= button_to @readonly ? "Close" : "Cancel", class: 'vpi_submit_button', data: {function: "cancel-js"} %>
<% cancel_js = data_set.new_record? ? "$('##{data_set_row_id}').remove();" : "toggle_data_set('#{data_set.id}', '#{builder_id}', '#{data_set_row_id}'); return false;"%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment