Sha256: c1c8ca84561d9db24ac568882ac0c4d0e6f079f20989079c37910c6bec65cf1a

Contents?: true

Size: 806 Bytes

Versions: 30

Compression:

Stored size: 806 Bytes

Contents

module Locomotive
  module Api
    class TranslationsController < BaseController

      load_and_authorize_resource class: Locomotive::Translation, through: :current_site

      def index
        respond_with(@translations)
      end

      def show
        respond_with @translation
      end

      def create
        @translation.from_presenter(params[:translation])
        @translation.save
        respond_with @translation, location: main_app.locomotive_api_translation_path(@translation)
      end

      def update
        @translation.update_attributes(params[:translation])
        respond_with @translation, location: main_app.locomotive_api_translation_path(@translation)
      end

      def destroy
        @translation.destroy
        respond_with @translation
      end

    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

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