Added rss2_id and fix redirect_to url

This commit is contained in:
manson 2014-07-15 15:06:17 +08:00
parent 4e71e8ae86
commit ea5c94a13c
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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