From 17231d64b820888d63e5ba00e01218c4706263f6 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 10 Jul 2019 10:26:31 +0800 Subject: [PATCH] add project package routes --- .../project_packages_controller.rb | 29 +++++++++++++++++++ config/routes.rb | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 app/controllers/project_packages_controller.rb diff --git a/app/controllers/project_packages_controller.rb b/app/controllers/project_packages_controller.rb new file mode 100644 index 00000000..cdedea9e --- /dev/null +++ b/app/controllers/project_packages_controller.rb @@ -0,0 +1,29 @@ +# encoding=utf-8 +# For react +class ProjectPackagesController < ApplicationController + before_filter :require_login, :except => [:index] + + include ApplicationHelper + + def show + render_react + end + + def new + render_react + end + + def index + render_react + end + + def edit + render_react + end + + private + def render_react + render file: 'public/react/build/index.html', :layout => false + end + +end diff --git a/config/routes.rb b/config/routes.rb index bfdabd5c..762096f0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -57,6 +57,8 @@ RedmineApp::Application.routes.draw do ## oauth相关 get :publish_success, on: :collection end + resources :project_packages, only: [:index, :show, :new, :edit] + resources :ec_course_evaluations do member do match 'import_score', :via => [:post]