Created
March 21, 2016 15:53
-
-
Save onelittlenightmusic/ed5b9119753a5bbc28ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a manifest file that'll be compiled into application.js, which will include all the files | |
// listed below. | |
// | |
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. | |
// | |
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
// compiled file. | |
// | |
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details | |
// about supported directives. | |
// | |
//= require jquery | |
//= require jquery_ujs | |
//= require turbolinks | |
//= require_tree . | |
//= require jquery-ui/sortable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery -> | |
$('.table-sortable').sortable | |
axis: 'y' | |
items: '.item' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p id="notice"><%= notice %></p> | |
<h1>Listing Data Models</h1> | |
<table class="table-sortable"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Description</th> | |
<th colspan="3"></th> | |
</tr> | |
</thead> | |
<tbody> | |
<% @data_models.each do |data_model| %> | |
<tr class="item"> | |
<td><%= data_model.name %></td> | |
<td><%= data_model.description %></td> | |
<td><%= link_to 'Show', data_model %></td> | |
<td><%= link_to 'Edit', edit_data_model_path(data_model) %></td> | |
<td><%= link_to 'Destroy', data_model, method: :delete, data: { confirm: 'Are you sure?' } %></td> | |
</tr> | |
<% end %> | |
</tbody> | |
</table> | |
<br> | |
<%= link_to 'New Data model', new_data_model_path %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment