Class: WhurlEngine::ParameterDefinitionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- WhurlEngine::ParameterDefinitionsController
- Defined in:
- app/controllers/whurl_engine/parameter_definitions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 |
# File 'app/controllers/whurl_engine/parameter_definitions_controller.rb', line 7 def create @parameter_definition = WhurlEngine::ParameterDefinition.new(params[:parameter_definition]) unless @parameter_definition.save render :partial => 'whurl_engine/shared/error', :locals => {:object => @parameter_definition} end end |
#destroy ⇒ Object
25 26 27 28 29 30 |
# File 'app/controllers/whurl_engine/parameter_definitions_controller.rb', line 25 def destroy @parameter_definition = WhurlEngine::ParameterDefinition.find(params[:id]) unless @parameter_definition.destroy render :partial => 'whurl_engine/shared/error', :locals => {:object => @parameter_definition} end end |
#edit ⇒ Object
14 15 16 |
# File 'app/controllers/whurl_engine/parameter_definitions_controller.rb', line 14 def edit @parameter_definition = WhurlEngine::ParameterDefinition.find(params[:id]) end |
#new ⇒ Object
3 4 5 |
# File 'app/controllers/whurl_engine/parameter_definitions_controller.rb', line 3 def new @parameter_definition = WhurlEngine::ParameterDefinition.new(:resource_id => params[:resource_id]) end |
#update ⇒ Object
18 19 20 21 22 23 |
# File 'app/controllers/whurl_engine/parameter_definitions_controller.rb', line 18 def update @parameter_definition = WhurlEngine::ParameterDefinition.find(params[:id]) unless @parameter_definition.update_attributes(params[:parameter_definition]) render :partial => 'whurl_engine/shared/error', :locals => {:object => @parameter_definition} end end |