Class: TicketsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- TicketsController
- Defined in:
- app/controllers/tickets_controller.rb
Instance Method Summary collapse
Methods included from ControllerMixins::Tickets
Instance Method Details
#create ⇒ Object
16 17 18 |
# File 'app/controllers/tickets_controller.rb', line 16 def create create!(:ticket_path) # In ControllerMixins::Tickets module end |
#edit ⇒ Object
31 32 |
# File 'app/controllers/tickets_controller.rb', line 31 def edit end |
#new ⇒ Object
13 14 |
# File 'app/controllers/tickets_controller.rb', line 13 def new end |
#show ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/tickets_controller.rb', line 20 def show @work_units = WorkUnit.for_ticket(@ticket).sort_by_scheduled_at unless @ticket.estimated_hours flash.now[:notice] = "NOTE: The estimated amount of time to complete this ticket has not been entered." end if @ticket.percentage_complete.to_i > 100 flash.now[:notice] = "WARNING: Ticket has exceeded the estimated amount of time to be completed." end end |
#update ⇒ Object
34 35 36 37 |
# File 'app/controllers/tickets_controller.rb', line 34 def update @ticket.update_attributes(params[:ticket]) generic_save_and_redirect(:ticket, :update) end |