Sha256: befa71d6c2fc99a9c36d7ba66c18295f5b874a5cf2c44198a7620c7a6a5b7996

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

require_dependency "i18n_dashboard/application_controller"

module I18nDashboard
  class TranslationsController < ApplicationController

    def index
       @translations = Translation.all(params[:query])
    end

    def create
      Translation.create(params[:key], params[:value], params[:locale])
      redirect_to root_path, :notice => "Added translations"
    end

    def destroy
      Translation.destroy(params[:id])
      redirect_to root_path, :notice => "Key deleted"
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n_dashboard-0.1.3 app/controllers/i18n_dashboard/translations_controller.rb