diff --git a/app/controllers/admin/conferences_controller.rb b/app/controllers/admin/conferences_controller.rb index 84f92838..5afbb780 100644 --- a/app/controllers/admin/conferences_controller.rb +++ b/app/controllers/admin/conferences_controller.rb @@ -167,7 +167,7 @@ module Admin def edit @conferences = Conference.all - @date_string = date_string(@conference.start_date, @conference.end_date) + @date_string = @conference.date_range_string respond_to do |format| format.html format.json { render json: @conference.to_json } diff --git a/app/views/conference_registrations/show.html.haml b/app/views/conference_registrations/show.html.haml index 5225deb1..f99088c9 100644 --- a/app/views/conference_registrations/show.html.haml +++ b/app/views/conference_registrations/show.html.haml @@ -13,7 +13,7 @@ = "#{@conference.venue.street}," = "#{@conference.venue.city} / #{@conference.venue.country_name}." %small - = date_string(@conference.start_date, @conference.end_date) + = @conference.date_range_string .row .col-md-12 %h4 diff --git a/app/views/conferences/_conference_details.html.haml b/app/views/conferences/_conference_details.html.haml index 3f60d997..d9bc1ac9 100644 --- a/app/views/conferences/_conference_details.html.haml +++ b/app/views/conferences/_conference_details.html.haml @@ -9,7 +9,7 @@ = conference.title %small %b - = date_string(conference.start_date, conference.end_date) + = conference.date_range_string - if conference.venue %p = "#{conference.venue.city}/#{conference.venue.country_name}" diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml index fb488e22..0ec6be8f 100644 --- a/app/views/conferences/show.html.haml +++ b/app/views/conferences/show.html.haml @@ -27,7 +27,7 @@ = "#{@conference.venue.city} / #{@conference.venue.country_name}" - if @conference.start_date && @conference.end_date %br - = date_string(@conference.start_date, @conference.end_date) + = @conference.date_range_string - unless @conference.description.blank? %section#about diff --git a/spec/views/conferences/index.html.haml_spec.rb b/spec/views/conferences/index.html.haml_spec.rb index c4ff3aa2..678677d8 100644 --- a/spec/views/conferences/index.html.haml_spec.rb +++ b/spec/views/conferences/index.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe 'conferences/index' do it 'renders _conference partial for each conference' do - allow(view).to receive(:date_string).and_return('January 17 - 21 2014') + allow(view).to receive(:date_range_string).and_return('January 17 - 21 2014') assign(:current, [create(:conference), create(:conference)]) render expect(view).to render_template(partial: '_conference_details', count: 2) diff --git a/spec/views/conferences/show.html.haml_spec.rb b/spec/views/conferences/show.html.haml_spec.rb index 72e68c4f..582ed12c 100644 --- a/spec/views/conferences/show.html.haml_spec.rb +++ b/spec/views/conferences/show.html.haml_spec.rb @@ -3,7 +3,7 @@ describe 'conferences/show.html.haml' do let!(:conference) { create(:full_conference) } before(:each) do - allow(view).to receive(:date_string).and_return('January 17 - 21 2014') + allow(view).to receive(:date_range_string).and_return('January 17 - 21 2014') assign :conference, conference render end