public
Fork of tablatom/hobocentral
Description: Markdown sources for http://hobocentral.net
Homepage: http://hobocentral.net
Clone URL: git://github.com/drnic/hobocentral.git
Search Repo:
added example of 'tasks.count' column for Story table
drnic (author)
Mon May 12 18:53:51 -0700 2008
commit  3a3c8578c31082d16fffa52a5fd057c3964b04b4
tree    6eb6cb79f68201ae15e3b5293d2ccace14864a88
parent  7aeb1956a77ddd4f1afcd217d008a46ff83ca790
...
412
413
414
 
 
415
416
417
...
412
413
414
415
416
417
418
419
0
@@ -412,6 +412,8 @@
0
 
0
 The `fields` attribute to `<table-plus>` lets you specify a list of fields that will become the columns in the table. We could have said `fields="title, status"` which would have given us the same content in the table, but by saying `this`, the first column contains links to the stories, rather than just the title as text.
0
 
0
+We could also add a column showing the number of tasks in a story. Change to `fields="this, tasks.count, status"` and see that a column is added with a readable title "Tasks Count".
0
+
0
 Now for the controller side. Add a `show` method to `app/controllers/projects_controller.rb` like this:
0
   
0
   def  show

Comments

    No one has commented yet.