Class: DbsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/tamplates/dbs_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/tamplates/dbs_controller.rb', line 3

def show

	@name = params[:id]
	@model_name = @name.camelize   
	@content = eval(@model_name).all

	respond_to do |format|
		format.html # show.html.erb
		format.json { render json: @content }
       end

end