Class: MerbAdmin::Application
- Inherits:
-
Merb::Controller
- Object
- Merb::Controller
- MerbAdmin::Application
- Defined in:
- app/controllers/application.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#set_model ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/application.rb', line 7 def set_model @model_name = params[:model_name].to_s.camel_case.singularize begin @model = eval(@model_name) rescue StandardError raise NotFound end @properties = @model.properties.to_a end |