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