Sha256: ddb5d7a5358823c4c1d99922eabdec0daa4ef2f437e9795f9a32492b65bcf0f8
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
module Harvesting module Models class TimeEntry < HarvestRecord attributed :id, :spent_date, :hours, :notes, :is_locked, :locked_reason, :is_closed, :is_billed, :timer_started_at, :started_time, :ended_time, :is_running, :billable, :budgeted, :billable_rate, :cost_rate, :invoice, :external_reference, :created_at, :updated_at, :user_assignment # temporarily return the hash itself until the model is added modeled project: Project, user: User, task: Task, client: Client, task_assignment: TaskAssignment def path @attributes['id'].nil? ? "time_entries" : "time_entries/#{@attributes['id']}" end def to_hash { project_id: project.id, task_id: task.id, user_id: user.id }.merge(super) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
harvesting-0.3.0 | lib/harvesting/models/time_entry.rb |