From 2cc0644fd7c40965269e8a7aede1391e8cdb4c2d Mon Sep 17 00:00:00 2001 From: Todd Werth Date: Fri, 12 Dec 2014 14:12:38 -0800 Subject: [PATCH] Updated table template to make it simpler, no need for extra stylesheet for the view, it just makes it overly complicated --- .../app/stylesheets/name_cell_stylesheet.rb | 14 -------------- .../app/stylesheets/name_controller_stylesheet.rb | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 templates/table_view_controller/app/stylesheets/name_cell_stylesheet.rb diff --git a/templates/table_view_controller/app/stylesheets/name_cell_stylesheet.rb b/templates/table_view_controller/app/stylesheets/name_cell_stylesheet.rb deleted file mode 100644 index f1f71a3..0000000 --- a/templates/table_view_controller/app/stylesheets/name_cell_stylesheet.rb +++ /dev/null @@ -1,14 +0,0 @@ -module <%= @name_camel_case %>CellStylesheet - def <%= @name %>_cell_height - 80 - end - - def <%= @name %>_cell(st) - # Style overall cell here - st.background_color = color.random - end - - def cell_label(st) - st.color = color.black - end -end diff --git a/templates/table_view_controller/app/stylesheets/name_controller_stylesheet.rb b/templates/table_view_controller/app/stylesheets/name_controller_stylesheet.rb index 405e3d2..1de1ef0 100644 --- a/templates/table_view_controller/app/stylesheets/name_controller_stylesheet.rb +++ b/templates/table_view_controller/app/stylesheets/name_controller_stylesheet.rb @@ -1,7 +1,5 @@ class <%= @name_camel_case %>ControllerStylesheet < ApplicationStylesheet - include <%= @name_camel_case %>CellStylesheet - def setup # Add stylesheet specific setup stuff here. # Add application specific setup stuff in application_stylesheet.rb @@ -10,4 +8,17 @@ class <%= @name_camel_case %>ControllerStylesheet < ApplicationStylesheet def table(st) st.background_color = color.gray end + + def <%= @name %>_cell_height + 80 + end + + def <%= @name %>_cell(st) + # Style overall cell here + st.background_color = color.random + end + + def cell_label(st) + st.color = color.black + end end