Class: Maglev::AddSiteLocale

Inherits:
Object
  • Object
show all
Includes:
Injectable
Defined in:
app/services/maglev/add_site_locale.rb

Overview

Add a locale (instace of Maglev::Site::Locale) to a site

Instance Method Summary collapse

Instance Method Details

#callObject



11
12
13
14
15
16
17
# File 'app/services/maglev/add_site_locale.rb', line 11

def call
  return if locale.blank? || !site.add_locale(locale)

  ActiveRecord::Base.transaction do
    unsafe_call
  end
end