app/controllers/tickets_controller.rb in artfully_ose-1.2.0 vs app/controllers/tickets_controller.rb in artfully_ose-1.3.0.pre1
- old
+ new
@@ -12,19 +12,21 @@
@summary = @section.summarize
end
end
def validated
- authorize! :edit, Ticket
- Ticket.find(params[:id]).validate_ticket!(current_user)
+ @ticket = Ticket.find(params[:id])
+ authorize! :check_in, Ticket
+ @ticket.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!
+ @ticket = Ticket.find(params[:id])
+ authorize! :check_in, Ticket
+ @ticket.unvalidate_ticket!
respond_to do |format|
format.json { head :ok }
end
end