From e432b71fb785f0b41662dfea105d0db123782ab6 Mon Sep 17 00:00:00 2001 From: Chrisbr Date: Mon, 28 Apr 2014 20:14:43 +0200 Subject: [PATCH] Fixes social_events form --- .../{social_events_list.html.haml => index.html.haml} | 2 +- config/routes.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) rename app/views/admin/social_events/{social_events_list.html.haml => index.html.haml} (73%) diff --git a/app/views/admin/social_events/social_events_list.html.haml b/app/views/admin/social_events/index.html.haml similarity index 73% rename from app/views/admin/social_events/social_events_list.html.haml rename to app/views/admin/social_events/index.html.haml index 579abd55..0952ffa9 100644 --- a/app/views/admin/social_events/social_events_list.html.haml +++ b/app/views/admin/social_events/index.html.haml @@ -2,6 +2,6 @@ .col-md-3 = render 'admin/conference/sidebar' .col-md-9 - = semantic_form_for(@conference, :url => admin_conference_social_events_path(@conference.short_title)) do |f| + = semantic_form_for(@conference, :url => admin_conference_social_event_path(:conference_id => @conference.short_title, :id => @conference.social_events)) do |f| = dynamic_association :social_events, "Social Events", f = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/config/routes.rb b/config/routes.rb index 471628b9..bed913b7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -22,8 +22,6 @@ Osem::Application.routes.draw do put "/supporter_levels" => "supporter_levels#update" get "/venue" => "venue#show", :as => "venue_info" put "/venue" => "venue#update", :as => "venue_update" - get "/social_events" => "social_events#show", :as => "social_events" - put "/social_events" => "social_events#update" get "/dietary_choices" => "dietchoices#show", :as => "dietary_list" put "/dietary_choices" => "dietchoices#update", :as => "dietary_update" get "/volunteers_list" => "volunteers#show" @@ -37,6 +35,7 @@ Osem::Application.routes.draw do resources :rooms, :only => [ :show, :update, :index ] resources :tracks, :only => [ :show, :update, :index ] resources :eventtype, :only => [ :show, :update, :index ] + resources :social_events, :only => [ :show, :update, :index ] put "/questions/update_conference" => "questions#update_conference" resources :questions resources :events do