-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧹 Create a module for video embed form
This commit DRYs up repetitive code by creating a VideoEmbedFormBehavior module.
- Loading branch information
Shana Moore
committed
Dec 6, 2023
1 parent
8d997e4
commit 4e8da4d
Showing
4 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_sting_literal: true | ||
|
||
module VideoEmbedFormBehavior | ||
extend ActiveSupport::Concern | ||
|
||
included do | ||
self.terms += %i[video_embed] | ||
end | ||
|
||
def secondary_terms | ||
super + %i[video_embed] | ||
end | ||
end |