Created
April 8, 2014 19:53
-
-
Save bonyiii/10180721 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
class MyApp.CarsController extends Batman.ApplicationController | |
# Appears to work the same way MyApp.CarsIndexView#viewDidAppear | |
@afterAction only: "index", -> | |
$('table').dataTable() | |
index: (params) -> | |
@set('cars', MyApp.Car.get('all')) |
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
%h1= t('cars.list') | |
%table#cars.listing.datatable | |
%thead | |
%tr | |
%th= Car.human_attribute_name("name") | |
%th= Car.human_attribute_name("model") | |
%th | |
%tbody | |
%tr{ "data-foreach-car" => "cars" } | |
%td | |
%a{ "data-bind" => "car.name", "data-route" => "car" } | |
%td{ "data-bind" => "car.name" } | |
%td{ "data-bind" => "car.model" } | |
%td | |
%a{"data-event-click" => "destroy"} | |
= t('Destroy') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment