From 4794e0ba023ccf3b805b11fa9913c681e295fba8 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Fri, 21 Aug 2015 20:05:00 +0300 Subject: [PATCH] Fix language of existing events --- app/controllers/public/events_controller.rb | 2 +- lib/initfest/views/public/events/_form.slim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/public/events_controller.rb b/app/controllers/public/events_controller.rb index ef40dbf..2e37e11 100644 --- a/app/controllers/public/events_controller.rb +++ b/app/controllers/public/events_controller.rb @@ -12,7 +12,7 @@ module Public def new event_type = current_conference.event_types.find(params[:type]) - @event = Event.new event_type: event_type + @event = Event.new event_type: event_type, language: current_user.language end def create diff --git a/lib/initfest/views/public/events/_form.slim b/lib/initfest/views/public/events/_form.slim index 74f66a3..e894410 100644 --- a/lib/initfest/views/public/events/_form.slim +++ b/lib/initfest/views/public/events/_form.slim @@ -9,7 +9,7 @@ = form.input :subtitle = form.association :track, wrapper: :default, collection: current_conference.tracks.map { |track| [track.name, track.id, {title: track.description}] } = form.input :length, hint: t('simple_form.hints.event.length', type: @event.event_type.name.mb_chars.downcase, min: @event.event_type.minimum_length, max: @event.event_type.maximum_length) - = form.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default, checked: current_user.language + = form.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default = form.input :abstract = form.input :description = form.input :notes