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