This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
phone_app/app/controllers/admin/cibles_controller.rb
2021-08-23 10:26:02 +02:00

25 lines
500 B
Ruby

# -*- encoding : utf-8 -*-
class Admin::CiblesController < ApplicationController
before_action :auth_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