Fix #4987: Can't populate tag string from upload url anymore.
Usage: https://danbooru.donmai.us/uploads/new?url=...&post[tag_string]=...&post[rating]=... * Pass the URL parameters from the /uploads/new page to the /uploads/:id page. * Fix the /uploads/:id page throwing an "unpermitted parameters" error when given URL params for the post edit form.
This commit is contained in:
@@ -76,6 +76,12 @@ class PostPolicy < ApplicationPolicy
|
||||
translated_commentary_desc translated_commentary_title]
|
||||
end
|
||||
|
||||
# XXX For UploadsController#show action
|
||||
def permitted_attributes_for_show
|
||||
%i[tag_string rating parent_id source is_pending artist_commentary_desc
|
||||
artist_commentary_title translated_commentary_desc translated_commentary_title]
|
||||
end
|
||||
|
||||
def permitted_attributes_for_update
|
||||
%i[tag_string old_tag_string parent_id old_parent_id source old_source rating old_rating has_embedded_notes]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user