5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 02:31:42 +00:00
panel/app/controllers/i18n_controller.rb

22 lines
391 B
Ruby
Raw Normal View History

2018-02-09 21:28:27 +00:00
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