Skip to content

Commit

Permalink
Add labs videos
Browse files Browse the repository at this point in the history
iHiD committed Jan 28, 2025
1 parent 6e8c329 commit 906da20
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/views/bootcamp/levels/show.html.haml
Original file line number Diff line number Diff line change
@@ -31,6 +31,10 @@
- if @level.youtube_id
.mt-24
= render ReactComponents::Common::YoutubePlayer.new(@level.youtube_id, 'community')
- if @level.youtube_id
.mt-24
= render ReactComponents::Common::YoutubePlayer.new(@level.labs_youtube_id, 'community')


%hr.border-borderColor5.my-32

7 changes: 7 additions & 0 deletions db/migrate/20250128231332_add_labs_youtube_id_to_levels.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class AddLabsYoutubeIdToLevels < ActiveRecord::Migration[7.0]
def change
return if Rails.env.production?

add_column :bootcamp_levels, :labs_youtube_id, :string
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2025_01_11_213608) do
ActiveRecord::Schema[7.0].define(version: 2025_01_28_231332) do
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -128,6 +128,7 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "youtube_id"
t.string "labs_youtube_id"
end

create_table "bootcamp_projects", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|

0 comments on commit 906da20

Please sign in to comment.