Sha256: ab07e9341392fb7623f65aa1639fbb6e37af1c03028eeb4ba605b4f6acdcc1c0
Contents?: true
Size: 663 Bytes
Versions: 4
Compression:
Stored size: 663 Bytes
Contents
require_dependency 'lit/application_controller' module Lit class LocalesController < ApplicationController def index @locales = Locale.ordered respond_to do |format| format.html # index.html.erb format.json { render json: @locales } end end def hide @locale = Locale.find(params[:id]) @locale.is_hidden = !@locale.is_hidden? @locale.save respond_to :js end def destroy @locale = Locale.find(params[:id]) @locale.destroy respond_to do |format| format.html { redirect_to locales_url } format.json { head :no_content } end end end end
Version data entries
4 entries across 4 versions & 2 rubygems