add licenses show

This commit is contained in:
feng 2025-03-11 14:26:22 +08:00 committed by xxq250
parent 1ccbecc112
commit e0bc394bd3
2 changed files with 7 additions and 0 deletions

View File

@ -4,4 +4,8 @@ class LicensesController < ApplicationController
q = License.ransack(name_cont: params[:name])
@licenses = q.result(distinct: true)
end
def show
@license = License.find(params[:id])
end
end

View File

@ -0,0 +1,3 @@
json.id @license.id
json.name @license.name
json.content @license.content