Skip to content
Snippets Groups Projects
Commit c6141d32 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

dry

parent a46dc235
No related branches found
No related tags found
No related merge requests found
class Admin::Research::PublicationsController < Admin::Research::ApplicationController
before_action :load, except: :index
def index
@publications = Research::Publication.ordered.page(params[:page])
......@@ -6,23 +7,20 @@ class Admin::Research::PublicationsController < Admin::Research::ApplicationCont
end
def show
@publication = Research::Publication.find params[:id]
breadcrumb
end
def static
@about = Research::Publication.find params[:id]
@about = @publication
render layout: false
end
def update
protected
def load
@publication = Research::Publication.find params[:id]
# TODO update from api
redirect_to admin_research_publication_path(@publication)
end
protected
def breadcrumb
super
add_breadcrumb Research::Publication.model_name.human(count: 2),
......
namespace :research do
resources :researchers, only: [:index, :show, :update]
resources :publications, only: [:index, :show, :update] do
resources :publications, only: [:index, :show] do
member do
get :static
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment