From 2314877f03cdc6b2f25014718ed802978448b2e3 Mon Sep 17 00:00:00 2001 From: Godwin Date: Wed, 16 Sep 2015 17:10:08 -0700 Subject: [PATCH] More logging info and more null checking in stats.xls --- app/controllers/conferences_controller.rb | 13 +++++++------ ...kshop--conferences.MyBikeBike.workshops.1-1.html | 4 ++-- ...kshop--conferences.MyBikeBike.workshops.1-2.html | 4 ++-- ...orkshop--conferences.MyBikeBike.workshops.1.html | 4 ++-- ...t-message--conferences.MyBikeBike.broadcast.html | 4 ++-- ...kshop--conferences.MyBikeBike.workshops.1-1.html | 4 ++-- ...kshop--conferences.MyBikeBike.workshops.1-2.html | 4 ++-- ...orkshop--conferences.MyBikeBike.workshops.1.html | 4 ++-- .../Start-registration-from-landing-page--.html | 2 +- ...ing-page--conferences.MyBikeBike.register-1.html | 4 ++-- ...ing-page--conferences.MyBikeBike.register-3.html | 2 +- ...ation-from-landing-page--email_confirmation.html | 4 ++-- ...rom-landing-page--registration_confirmation.html | 2 +- ...iew-stats--conferences.MyBikeBike.stats.xls.html | 2 +- 14 files changed, 29 insertions(+), 28 deletions(-) diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index d2abc54..118e69a 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -469,13 +469,13 @@ class ConferencesController < ApplicationController if @excel_data user = User.find(r.user_id) @excel_data[:data] << { - :name => user.firstname, - :email => user.email, - :date => r.created_at ? r.created_at.strftime("%F %T") : nil, - :city => r.city, + :name => (user ? user.firstname : nil) || '', + :email => (user ? user.email : nil) || '', + :date => r.created_at ? r.created_at.strftime("%F %T") : '', + :city => r.city || '', :languages => ((JSON.parse(r.languages || '[]').map { |x| I18n.t"languages.#{x}" }).join(', ').to_s), - :arrival => (r.arrival || @this_conference.start_date).strftime("%F %T"), - :departure => (r.departure || @this_conference.end_date).strftime("%F %T"), + :arrival => r.arrival ? r.arrival.strftime("%F %T") : '', + :departure => r.departure ? r.departure.strftime("%F %T") : '', :housing => (I18n.t"articles.conference_registration.questions.housing.#{r.housing || 'none'}"), :bike => (I18n.t"articles.conference_registration.questions.bike.#{r.bike || 'none'}"), :food => (I18n.t"articles.conference_registration.questions.food.#{r.food || 'meat'}"), @@ -488,6 +488,7 @@ class ConferencesController < ApplicationController end if ENV["RAILS_ENV"] == 'test' && request.format.xls? + logger.info "Rendering stats.xls as HTML" request.format = :html respond_to do |format| format.html { render :file => 'application/excel.xls.haml', :formats => [:xls] } diff --git a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html index 886b37e..c4d2591 100644 --- a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html +++ b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html @@ -51,7 +51,7 @@
-

Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo

+

Vestibulum Ante Ipsum Primis In Faucibus Orci Luctus Et Ultrices Posuere Cubilia Curae; Donec Pharetra, Magna Vestibulum Aliquet Ultrices, Erat Tortor Sollicitudin Mi, Sit Amet Lobortis Sapien Sapien Non Mi

You are interested in this workshop
@@ -59,7 +59,7 @@
-

Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.

+

Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.

Facilitators

diff --git a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html index 9063ddf..907a6bb 100644 --- a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html +++ b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html @@ -51,7 +51,7 @@
-

Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo

+

Vestibulum Ante Ipsum Primis In Faucibus Orci Luctus Et Ultrices Posuere Cubilia Curae; Donec Pharetra, Magna Vestibulum Aliquet Ultrices, Erat Tortor Sollicitudin Mi, Sit Amet Lobortis Sapien Sapien Non Mi

No one is interested in this workshop yet
@@ -59,7 +59,7 @@
-

Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.

+

Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.

Facilitators

diff --git a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html index 9063ddf..907a6bb 100644 --- a/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html +++ b/config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html @@ -51,7 +51,7 @@
-

Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo

+

Vestibulum Ante Ipsum Primis In Faucibus Orci Luctus Et Ultrices Posuere Cubilia Curae; Donec Pharetra, Magna Vestibulum Aliquet Ultrices, Erat Tortor Sollicitudin Mi, Sit Amet Lobortis Sapien Sapien Non Mi

No one is interested in this workshop yet
@@ -59,7 +59,7 @@
-

Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.

+

Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.

Facilitators

diff --git a/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html b/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html index 629f1d9..170cf49 100644 --- a/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html +++ b/config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html @@ -78,7 +78,7 @@ @@ -94,7 +94,7 @@ diff --git a/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-1.html b/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-1.html index 7534ed5..206e9e2 100644 --- a/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-1.html +++ b/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-1.html @@ -51,7 +51,7 @@
-

Praesent Id Massa Id Nisl Venenatis Lacinia

+

Integer Aliquet, Massa Id Lobortis Convallis, Tortor Risus Dapibus Augue, Vel Accumsan Tellus Nisi Eu Orci

You and 4 others are interested in this workshop
@@ -59,7 +59,7 @@
-

In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.

+

Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.

Facilitators

diff --git a/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-2.html b/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-2.html index 0bb3022..8338375 100644 --- a/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-2.html +++ b/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-2.html @@ -51,7 +51,7 @@
-

Praesent Id Massa Id Nisl Venenatis Lacinia

+

Integer Aliquet, Massa Id Lobortis Convallis, Tortor Risus Dapibus Augue, Vel Accumsan Tellus Nisi Eu Orci

4 people are interested in this workshop
@@ -59,7 +59,7 @@
-

In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.

+

Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.

Facilitators

diff --git a/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1.html b/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1.html index 0bb3022..8338375 100644 --- a/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1.html +++ b/config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1.html @@ -51,7 +51,7 @@
-

Praesent Id Massa Id Nisl Venenatis Lacinia

+

Integer Aliquet, Massa Id Lobortis Convallis, Tortor Risus Dapibus Augue, Vel Accumsan Tellus Nisi Eu Orci

4 people are interested in this workshop
@@ -59,7 +59,7 @@
-

In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.

+

Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.

Facilitators

diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--.html b/config/locales/data/html_records/Start-registration-from-landing-page--.html index 7f4e8e3..638ca02 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--.html @@ -62,7 +62,7 @@ Curabitur non nulla sit amet nisl tempus convallis quis ac lectus.

My Awesome Workshop

-

Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.

+

Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla. Quisque arcu libero, rutrum ac, lobortis vel, dapibus at, diam.

diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html b/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html index c7cb76f..4aa380e 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html @@ -81,7 +81,7 @@

-Confirm now +Confirm now

@@ -95,7 +95,7 @@
diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html b/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html index f6b223c..0f23dd2 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html @@ -90,7 +90,7 @@ diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html b/config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html index c7cb76f..4aa380e 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html @@ -81,7 +81,7 @@

-Confirm now +Confirm now

@@ -95,7 +95,7 @@ diff --git a/config/locales/data/html_records/Start-registration-from-landing-page--registration_confirmation.html b/config/locales/data/html_records/Start-registration-from-landing-page--registration_confirmation.html index f6b223c..0f23dd2 100644 --- a/config/locales/data/html_records/Start-registration-from-landing-page--registration_confirmation.html +++ b/config/locales/data/html_records/Start-registration-from-landing-page--registration_confirmation.html @@ -90,7 +90,7 @@ diff --git a/config/locales/data/html_records/View-stats--conferences.MyBikeBike.stats.xls.html b/config/locales/data/html_records/View-stats--conferences.MyBikeBike.stats.xls.html index 56e5931..dfffb3b 100644 --- a/config/locales/data/html_records/View-stats--conferences.MyBikeBike.stats.xls.html +++ b/config/locales/data/html_records/View-stats--conferences.MyBikeBike.stats.xls.html @@ -28,7 +28,7 @@ Excel Spreadsheet - +
- +
-© Bike!Bike! 2015 +© Bike!Bike! 2015
-© Bike!Bike! 2015 +© Bike!Bike! 2015
-© Bike!Bike! 2015 +© Bike!Bike! 2015
-© Bike!Bike! 2015 +© Bike!Bike! 2015
-© Bike!Bike! 2015 +© Bike!Bike! 2015
Jeff someguy@bikebike.org Somewhere2015-09-16 23:53:562015-09-17 00:08:00 English 2015-09-28 00:00:00 2015-09-28 00:00:00