Skip to content

Commit

Permalink
Added index view. Closes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
manner committed Nov 7, 2017
1 parent cbc2a68 commit f79d1a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/controllers/papers_controller.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
class PapersController < ApplicationController
def index
@papers = Paper.all
end

def show
@paper = Paper.find(params[:id])
end

def new
end

def edit
end

def create
@paper = Paper.new(paper_params)
if @paper.save()
redirect_to @paper
else
render 'new'
end

end

private
Expand Down
Empty file added app/views/papers/index.html.erb
Empty file.

0 comments on commit f79d1a3

Please sign in to comment.