redirect upload to post page on success
This commit is contained in:
@@ -22,7 +22,13 @@ class UploadsController < ApplicationController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
@upload = Upload.find(params[:id])
|
@upload = Upload.find(params[:id])
|
||||||
respond_with(@upload)
|
respond_with(@upload) do |format|
|
||||||
|
format.html do
|
||||||
|
if @upload.is_completed? && @upload.post_id
|
||||||
|
redirect_to(post_path(@upload.post_id))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
Reference in New Issue
Block a user