mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 02:31:42 +00:00
22 lines
391 B
Ruby
22 lines
391 B
Ruby
|
class I18nController < ApplicationController
|
||
|
before_action :authenticate!
|
||
|
|
||
|
def index
|
||
|
@site = find_site
|
||
|
|
||
|
redirect_to site_i18n_edit_path(@site)
|
||
|
end
|
||
|
|
||
|
def edit
|
||
|
@site = find_site
|
||
|
@lang_from = I18n.locale.to_s
|
||
|
@lang_to = @site.config['i18n'].reject { |i| i == @lang_from }.sample
|
||
|
@lang_to = 'es'
|
||
|
end
|
||
|
|
||
|
def update
|
||
|
@site = find_site
|
||
|
binding.pry
|
||
|
end
|
||
|
end
|