blog_perso_app/app/controllers/admin/cibles_controller.rb
Nicolas Bally 56a0aa9848 initial
2012-06-17 21:11:12 +02:00

25 lines
488 B
Ruby

# -*- encoding : utf-8 -*-
class Admin::CiblesController < ApplicationController
before_filter :authenticate_admin!
layout false
def index
@cible_type = params[:cible_type] || "MenuItem"
@cible_id = params[:cible_id] || nil
end
def new
@resource = params[:resource_type].to_s.constantize.new()
@resource.cible = params[:cible_type].to_s.constantize.new()
if params[:resource_type] == "LinkContent"
@namespace = :portlet
else
@namespace = :admin
end
end
end