Class: Locomotive::TranslationsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/locomotive/translations_controller.rb

Instance Method Summary collapse

Methods included from ActionController::UrlHelpers

#current_site_public_url, #public_page_url, #switch_to_site_url

Methods included from ActionController::SectionHelpers

#sections

Methods included from ActionController::LocaleHelpers

#back_to_default_site_locale, #current_content_locale, #localized?, #set_back_office_locale, #set_current_content_locale, #setup_i18n_fallbacks

Instance Method Details

#createObject



17
18
19
20
# File 'app/controllers/locomotive/translations_controller.rb', line 17

def create
  @translation = current_site.translations.create(params[:translation])
  respond_with @translation, location: translations_path
end

#editObject



22
23
24
# File 'app/controllers/locomotive/translations_controller.rb', line 22

def edit
  respond_with @translation
end

#indexObject



10
11
# File 'app/controllers/locomotive/translations_controller.rb', line 10

def index
end

#newObject



13
14
15
# File 'app/controllers/locomotive/translations_controller.rb', line 13

def new
  respond_with @translation
end

#updateObject



26
27
28
29
30
# File 'app/controllers/locomotive/translations_controller.rb', line 26

def update
  @translation = current_site.translations.find(params[:id])
  @translation.update_attributes(params[:translation])
  respond_with @translation, location: translations_path
end