9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'app/controllers/admin_dev_infos_controller.rb', line 9
def show
if params[:nom_objet].blank?
flash[:notice] = 'Il faut spécifier un nom de Classe.'
redirect_to( :action => :index )
return
end
_defini = false
begin
_defini = Object.const_defined?(params[:nom_objet])
rescue
end
if ! _defini
flash[:notice] = "La Classe #{params[:nom_objet]} n'existe pas."
redirect_to( :action => :index )
return
end
_La_classe = Object::const_get(params[:nom_objet])
if ! _La_classe.respond_to?(:new)
flash[:notice] = "La Classe #{_La_classe} ne fournit pas la méthode new()."
redirect_to( :action => :index )
return
end
@l_objet = _La_classe.new()
respond_to do |format|
format.html end
end
|