From ea5c94a13c87a2206a07a07878f281f6f0daa625 Mon Sep 17 00:00:00 2001 From: manson Date: Tue, 15 Jul 2014 15:06:17 +0800 Subject: [PATCH] Added rss2_id and fix redirect_to url --- app/controllers/admin/writing_conferences_controller.rb | 6 +++--- app/models/writing_conference.rb | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/writing_conferences_controller.rb b/app/controllers/admin/writing_conferences_controller.rb index 035a1df..c3876a0 100644 --- a/app/controllers/admin/writing_conferences_controller.rb +++ b/app/controllers/admin/writing_conferences_controller.rb @@ -17,7 +17,7 @@ class Admin::WritingConferencesController < OrbitMemberController @member = MemberProfile.find(conference_params['member_profile_id']) rescue nil @writing_conference = WritingConference.new(conference_params) @writing_conference.save - redirect_to '/admin/members/'+@member.to_param+'/WritingConference' + redirect_to URI.encode('/admin/members/'+@member.to_param+'/WritingConference') end def edit @@ -30,7 +30,7 @@ class Admin::WritingConferencesController < OrbitMemberController @writing_conference = WritingConference.find(params[:id]) @writing_conference.update_attributes(conference_params) @writing_conference.save - redirect_to '/admin/members/'+@member.to_param+'/WritingConference' + redirect_to URI.encode('/admin/members/'+@member.to_param+'/WritingConference') end def destroy @@ -66,7 +66,7 @@ class Admin::WritingConferencesController < OrbitMemberController @intro = @intro.nil? ? WritingConferenceIntro.new({:member_profile_id=>@member.id}) : @intro @intro.update_attributes(intro_params) @intro.save - redirect_to '/admin/members/'+@member.to_param+'/WritingConference' + redirect_to URI.encode('/admin/members/'+@member.to_param+'/WritingConference') end def get_settings diff --git a/app/models/writing_conference.rb b/app/models/writing_conference.rb index a3ebbf6..b2dd571 100644 --- a/app/models/writing_conference.rb +++ b/app/models/writing_conference.rb @@ -25,6 +25,7 @@ class WritingConference field :update_user_id, :type => BSON::ObjectId field :isbn field :isi_number + field :rss2_id belongs_to :member_profile