This commit is contained in:
17
app/controllers/pages/edits_controller.rb
Normal file
17
app/controllers/pages/edits_controller.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class Pages::EditsController < ApplicationController
|
||||
include PageLeafScoped
|
||||
|
||||
before_action :set_edit
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
private
|
||||
def set_edit
|
||||
if params[:id] == "latest"
|
||||
@edit = @leaf.edits.last
|
||||
else
|
||||
@edit = @leaf.edits.find(params[:id])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user