mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
get tag view working for updating todos. Refactored update a lot
This commit is contained in:
parent
1cea27ccc9
commit
f923a40a40
15 changed files with 314 additions and 215 deletions
|
|
@ -124,16 +124,9 @@ class ApplicationController < ActionController::Base
|
|||
# config/settings.yml
|
||||
#
|
||||
def format_date(date)
|
||||
if date
|
||||
date_format = prefs.date_format
|
||||
formatted_date = date.in_time_zone(prefs.time_zone).strftime("#{date_format}")
|
||||
else
|
||||
formatted_date = ''
|
||||
end
|
||||
formatted_date
|
||||
return date ? date.in_time_zone(prefs.time_zone).strftime("#{prefs.date_format}") : ''
|
||||
end
|
||||
|
||||
|
||||
def for_autocomplete(coll, substr)
|
||||
filtered = coll.find_all{|item| item.name.downcase.include? substr.downcase}
|
||||
json_elems = "[{" + filtered.map {|item| "\"value\" : \"#{item.name}\", \"id\" : \"#{item.id}\""}.join("},{") + "}]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue