lib/tabulatr/tabulatr/header_cell.rb in tabulatr-0.1.2 vs lib/tabulatr/tabulatr/header_cell.rb in tabulatr-0.1.3

- old
+ new

@@ -35,11 +35,11 @@ raise "Not in header mode!" if @row_mode != :header sortparam = "#{@classname}#{@table_form_options[:sort_postfix]}" bid = "#{@classname}#{@table_form_options[:sort_postfix]}" opts = normalize_column_options opts make_tag(:th, opts[:th_html]) do - concat(t(opts[:header] || name.to_s.capitalize), :escape_html) + concat(t(opts[:header] || name.to_s.humanize.titlecase), :escape_html) if opts[:sortable] and @table_options[:sortable] if @sorting and @sorting[:by].to_s == name.to_s pname = "#{sortparam}[_resort][#{name}][#{@sorting[:direction] == 'asc' ? 'desc' : 'asc'}]" bid = "#{bid}_#{name}_#{@sorting[:direction] == 'asc' ? 'desc' : 'asc'}" psrc = File.join(@table_options[:image_path_prefix], @table_options[@sorting[:direction] == 'desc' ? @@ -72,10 +72,10 @@ opts = normalize_column_options opts if opts[:sortable] and @table_options[:sortable] # change classes accordingly end make_tag(:th, opts[:th_html]) do - concat(t(opts[:header] || "#{relation.to_s.capitalize} #{name.to_s.capitalize}"), :escape_html) + concat(t(opts[:header] || "#{relation.to_s.humanize.titlecase} #{name.to_s.humanize.titlecase}"), :escape_html) end # </th> end def header_checkbox(opts={}, &block) raise "Whatever that's for!" if block_given?