* Enable Rails cops * Fix Rails/DynamicFindBy * Fix Rails/HttpStatus * Fix Rails/Blank * Fix Rails/RequestReferer * Fix Rails/ActiveRecordAliases * Fix Rails/FindBy * Fix Rails/Presence * Fix Rails/Delegate * Fix Rails/Validation * Fix Rails/PluralizationGrammar * Fix Rails/Present * Fix Rails/Output * Fix Rails/Blank * Fix Rails/FilePath * Fix Rails/InverseOf * Fix Rails/LexicallyScopedActionFilter * Add Rails/OutputSafety to TODO * Add Rails/HasManyOrHasOneDependent to TODO * Add Rails/SkipsModelValidations to TODO
9 lines
299 B
Ruby
9 lines
299 B
Ruby
class BadgesController < ApplicationController
|
|
before_action :set_cache_control_headers, only: [:show]
|
|
# No authorization required for entirely public controller
|
|
|
|
def show
|
|
@badge = Badge.find_by(slug: params[:slug]) || not_found
|
|
set_surrogate_key_header "badges-show-action"
|
|
end
|
|
end
|