Class: Dobro::ApplicationController
- Inherits:
-
Object
- Object
- Dobro::ApplicationController
- Defined in:
- app/controllers/dobro/application_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/controllers/dobro/application_controller.rb', line 20 def create if current_record.save redirect_to resource.route_for(current_record) else render 'new' end end |
#destroy ⇒ Object
36 37 38 39 |
# File 'app/controllers/dobro/application_controller.rb', line 36 def destroy current_record.destroy redirect_to resource.index_route end |
#update ⇒ Object
28 29 30 31 32 33 34 |
# File 'app/controllers/dobro/application_controller.rb', line 28 def update if current_record.update_attributes(params[singular_reference]) redirect_to resource.route_for(current_record) else render 'edit' end end |