Dropdown on details page allows image management for users and admins
This commit is contained in:
parent
263f6cd33f
commit
16999260ca
8 changed files with 75 additions and 35 deletions
|
|
@ -90,6 +90,15 @@ class PackagesController < ApplicationController
|
|||
send_file @screenshot.image.path(:thumb), type: "image/png", disposition: 'inline'
|
||||
end
|
||||
|
||||
# Receives a form with a simple text field 'description' so that users can update
|
||||
# the description of their screenshot.
|
||||
def update_screenshot_description
|
||||
@screenshot = Screenshot.find(params[:id])
|
||||
@screenshot.description = params[:description]
|
||||
@screenshot.save!
|
||||
redirect_to package_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Send a dummy thumbnail reading "No screenshot available. Sorry."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue