mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
add licenses show
This commit is contained in:
@@ -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
|
||||
|
||||
3
app/views/licenses/show.json.jbuilder
Normal file
3
app/views/licenses/show.json.jbuilder
Normal file
@@ -0,0 +1,3 @@
|
||||
json.id @license.id
|
||||
json.name @license.name
|
||||
json.content @license.content
|
||||
Reference in New Issue
Block a user