You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
418 B
17 lines
418 B
class Admins::CompetitionBasicSettingService < ApplicationService
|
|
attr_reader :competition, :params
|
|
|
|
def initialize(competition, params)
|
|
@params = params
|
|
@competition = competition
|
|
end
|
|
|
|
def call
|
|
ActiveRecord::Base.transaction do
|
|
competition.name = strip params[:name]
|
|
competition.sub_title = strip params[:sub_title]
|
|
competition.start_time = params[:start_time]
|
|
|
|
end
|
|
end
|
|
end |