app/controllers/tickets_controller.rb in artfully_ose-1.1.0 vs app/controllers/tickets_controller.rb in artfully_ose-1.2.0.alpha.1
- old
+ new
@@ -10,9 +10,25 @@
when_section_selected do
@section = Section.find(params[:section_id])
@summary = @section.summarize
end
end
+
+ def validated
+ authorize! :edit, Ticket
+ Ticket.find(params[:id]).validate_ticket!(current_user)
+ respond_to do |format|
+ format.json { head :ok }
+ end
+ end
+
+ def unvalidated
+ authorize! :edit, Ticket
+ Ticket.find(params[:id]).unvalidate_ticket!
+ respond_to do |format|
+ format.json { head :ok }
+ end
+ end
def when_section_selected
if !params[:section_id].blank?
yield
elsif @show.chart.sections.length == 1