Sha256: 12ff5e5726ddfe84d49820c7766501a939b10e76c1ee1d889d1ec887c90373d3

Contents?: true

Size: 1.01 KB

Versions: 26

Compression:

Stored size: 1.01 KB

Contents

module Locomotive
  class TranslationsController < BaseController

    sections :settings, :translations

    respond_to :json, only: [:create, :update]

    def index
      @translations = current_site.translations.ordered.page(params[:page]).per(Locomotive.config.ui[:per_page])
      respond_with @translations
    end

    def new
      @translation = current_site.translations.build
      respond_with @translation
    end

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

    def edit
      respond_with @translation
    end

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

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.6 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.6.rc2 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.6.rc1 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.5 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.4 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.3 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.2 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.1 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.0 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.0.rc3 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.0.rc2 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.5.0.rc1 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.4.1 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.4.0 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.3.1 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.3.0 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.2.3 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.2.2 app/controllers/locomotive/translations_controller.rb
locomotive_cms-2.2.1 app/controllers/locomotive/translations_controller.rb