Sha256: 78920714a1932a8b76a189490b64be7b4bb1323c914712debb5954dc9b011cdc

Contents?: true

Size: 721 Bytes

Versions: 77

Compression:

Stored size: 721 Bytes

Contents

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


Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
fullstack-cms-0.2.22 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.21 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.20 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.19 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.18 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.17 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.16 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.15 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.14 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.13 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.12 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.11 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.10 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.9 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.8 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.7 app/controllers/admin/menus_controller.rb
fullstack-cms-0.2.6 app/controllers/admin/menus_controller.rb