Class: PlanningClient::Checklist

Inherits:
LogicalModel
  • Object
show all
Includes:
ServiceConfiguration
Defined in:
app/models/planning_client/checklist.rb

Instance Method Summary collapse

Methods included from ServiceConfiguration

included

Instance Method Details

#assign_to(options = {}) ⇒ Boolean

Copies checklists items as to_dos

Examples:

@checklist.assign(responsible_username: ‘dwayne’, requester_username: ‘lucia’)

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • responsible_username (String)
  • requester_username (String)

Returns:

  • (Boolean)


25
26
27
28
29
30
31
32
33
34
35
# File 'app/models/planning_client/checklist.rb', line 25

def assign_to(options={})
  resp = Typhoeus::Request.get("#{self.class.resource_uri(self.id)}/assign",
                               params: self.class.merge_key(options))
  if resp.code == 200
    log_ok(resp)
    true
  else
    log_failed(resp)
    false
  end
end

#json_rootObject



37
38
39
# File 'app/models/planning_client/checklist.rb', line 37

def json_root
  'checklist'
end