Class: ReportsController
- Inherits:
-
InheritedResources::Base
- Object
- InheritedResources::Base
- ReportsController
- Defined in:
- app/controllers/reports_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/controllers/reports_controller.rb', line 5 def create build_resource.user = current_user create! do |success, failure| success.all { redirect_to table_report_path(@report.table, @report)} failure.all { render :new } end end |
#generate ⇒ Object
20 21 22 23 |
# File 'app/controllers/reports_controller.rb', line 20 def generate @report.queue_now! redirect_to table_report_path(@report.table, @report) end |
#update ⇒ Object
13 14 15 16 17 18 |
# File 'app/controllers/reports_controller.rb', line 13 def update update! do |success, failure| success.all { redirect_to table_report_path(@report.table, @report)} failure.all { render :edit } end end |