class Admin::MenusController < Admin::BaseController respond_to :html, :js def index @skip_filter = true @menus = Menu.order(:uid) if Fullstack::Cms.localized? @menus = @menus.where(:locale => params[:locale]) @locale = params[:locale] end end def new @menu = Menu.new end def edit end def create @menu = Menu.new(params[:menu]) if @menu.respond_to?(:author) @menu.author ||= current_user end @menu.save respond_with(@menu) end def update @menu.attributes = params[:menu] @menu.save respond_with(@menu) end def destroy @menu.destroy respond_with(@menu) end end