class Admin::PluginTemplateRelatedsController < OrbitMemberController def index end def new @plugin_template_related = PluginTemplateRelated.new @url = admin_course_semesters_path end def edit @plugin_template_related = PluginTemplateRelated.find(params[:id]) @url = admin_plugin_template_related_path(@plugin_template_related) end def create plugin_template_related = PluginTemplateRelated.create(plugin_template_related_params) @plugin_template_relateds = PluginTemplateRelated.all end def update plugin_template_related = PluginTemplateRelated.find(params[:id]) rescue nil if !plugin_template_related.nil? plugin_template_related.update_attributes(course_semester_params) end @plugin_template_relateds = PluginTemplateRelated.all end def destroy plugin_template_related = PluginTemplateRelated.find(params[:id]) rescue nil if !plugin_template_related.nil? plugin_template_related.destroy end @plugin_template_relateds = PluginTemplateRelated.all end private def plugin_template_related_params params.require(:plugin_template_related).permit! end end