From ab1a8c20ac3ca0faa315278535fedfb6c7004440 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 6 Apr 2016 02:10:42 +0800 Subject: [PATCH] fixed intro --- app/controllers/admin/certificates_controller.rb | 4 ++-- app/views/admin/certificates/frontend_setting.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/certificates_controller.rb b/app/controllers/admin/certificates_controller.rb index 29a94db..461bb0d 100644 --- a/app/controllers/admin/certificates_controller.rb +++ b/app/controllers/admin/certificates_controller.rb @@ -43,9 +43,9 @@ class Admin::CertificatesController < OrbitMemberController end def update_frontend_setting - @member = MemberProfile.find(intro_params['member_profile_id']) rescue nil + @member = MemberProfile.find(params['member_profile_id']) rescue nil @intro = CertificateIntro.find_by(:member_profile_id=>@member.id) rescue nil - @intro = @intro.nil? ? CourseIntro.new({:member_profile_id=>@member.id}) : @intro + @intro = @intro.nil? ? CertificateIntro.new({:member_profile_id=>@member.id}) : @intro @intro.update_attributes(intro_params) @intro.save redirect_to URI.encode('/admin/members/'+@member.to_param+'/Certificate') diff --git a/app/views/admin/certificates/frontend_setting.html.erb b/app/views/admin/certificates/frontend_setting.html.erb index 4443788..805a031 100644 --- a/app/views/admin/certificates/frontend_setting.html.erb +++ b/app/views/admin/certificates/frontend_setting.html.erb @@ -3,7 +3,7 @@ <%= stylesheet_link_tag "lib/main-list" %> <% end %> -<%= form_for(:course_intro, :url => update_frontend_setting_admin_courses_path, :method => "post", html: {class: "form-horizontal main-forms previewable"} ) do |f| %> +<%= form_for(:certificate_intro, :url => update_frontend_setting_admin_certificates_path, :method => "post", html: {class: "form-horizontal main-forms previewable"} ) do |f| %>