Class: ClientLogin::TicketsController
- Inherits:
-
BaseController
- Object
- BaseController
- ClientLogin::TicketsController
- Includes:
- ControllerMixins::Tickets
- Defined in:
- app/controllers/client_login/tickets_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /tickets.
-
#new ⇒ Object
GET /tickets/new.
-
#show ⇒ Object
GET /tickets/:id.
Methods included from ControllerMixins::Tickets
Instance Method Details
#create ⇒ Object
POST /tickets
19 20 21 22 |
# File 'app/controllers/client_login/tickets_controller.rb', line 19 def create @ticket.estimated_hours = 0.0 create!(:client_login_ticket_path) # In ControllerMixins::Tickets module end |
#new ⇒ Object
GET /tickets/new
15 16 |
# File 'app/controllers/client_login/tickets_controller.rb', line 15 def new end |
#show ⇒ Object
GET /tickets/:id
25 26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/client_login/tickets_controller.rb', line 25 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 |