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