Created
November 5, 2024 22:35
-
-
Save Hasstrup/7534551cad67f34e57ef8646eb75cb5c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# frozen_string_literal: true | |
class Templates::Components::Contexts::Creation < BaseService | |
performs_checks | |
def initialize(input:) | |
@input = input | |
end | |
def call | |
safely_execute do | |
succeed(::Templates::Component.create!(**input.to_h.except(:user_id))) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment