Class: Mite::TimeEntry::Bookmark
Class Method Summary
collapse
Instance Method Summary
collapse
#create, #destroy, #save
Methods inherited from Base
all, first, inherited, last
Class Method Details
.follow(id) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/mite/time_entry/bookmark.rb', line 23
def follow(id)
get("#{id}/follow")
rescue ActiveResource::Redirection => err
query = err.response['Location'].split(/\?/,2)[1] || ""
new(:query => query).follow
end
|
Instance Method Details
#follow ⇒ Object
18
19
20
|
# File 'lib/mite/time_entry/bookmark.rb', line 18
def follow
Mite::TimeEntry.all(:params => params)
end
|
#params ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/mite/time_entry/bookmark.rb', line 10
def params
hash = CGI.parse(query)
hash.each do |k, v|
hash[k] = v[0]
end
hash
end
|
#team? ⇒ Boolean
6
7
8
|
# File 'lib/mite/time_entry/bookmark.rb', line 6
def team?
user_id.blank?
end
|