forked from Gitlink/forgeplus
add: project's lesson_url
This commit is contained in:
parent
c3a1fb78ea
commit
04a1376820
|
@ -183,7 +183,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
private
|
||||
def project_params
|
||||
params.permit(:user_id, :name, :description, :repository_name, :website,
|
||||
params.permit(:user_id, :name, :description, :repository_name, :website, :lesson_url,
|
||||
:project_category_id, :project_language_id, :license_id, :ignore_id, :private)
|
||||
end
|
||||
|
||||
|
|
|
@ -5,4 +5,5 @@ json.description @project.description
|
|||
json.project_category_id @project.project_category_id
|
||||
json.project_language_id @project.project_language_id
|
||||
json.is_public @project.is_public
|
||||
json.website @project.website
|
||||
json.website @project.website
|
||||
json.lesson_url @project.lesson_url
|
|
@ -1,5 +1,6 @@
|
|||
json.content @project.content
|
||||
json.website @project.website
|
||||
json.lesson_url @project.lesson_url
|
||||
if @result[:readme].blank?
|
||||
json.readme nil
|
||||
else
|
||||
|
|
|
@ -6,4 +6,5 @@ json.project_category_id @project.project_category_id
|
|||
json.project_language_id @project.project_language_id
|
||||
json.private !@project.is_public
|
||||
json.website @project.website
|
||||
json.project_units @project.project_units.pluck(:unit_type)
|
||||
json.project_units @project.project_units.pluck(:unit_type)
|
||||
json.lesson_url @project.lesson_url
|
|
@ -0,0 +1,5 @@
|
|||
class AddLessonUrlToProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :projects, :lesson_url, :string
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue