mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-08 08:34:21 +01:00
Code style fixes
This commit is contained in:
parent
c6bbc67dab
commit
d8acf60049
72 changed files with 458 additions and 594 deletions
|
|
@ -72,5 +72,4 @@ class RichMessageExtractor
|
|||
def fix_date_string yymmdd
|
||||
"20#{yymmdd[0..1]}-#{yymmdd[2..3]}-#{yymmdd[4..5]} 00:00"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
class TodoFromRichMessage
|
||||
|
||||
attr_reader :user, :default_context_id, :description, :notes
|
||||
|
||||
def initialize(user, default_context_id, description, notes)
|
||||
|
|
@ -21,8 +20,9 @@ class TodoFromRichMessage
|
|||
|
||||
context_id = default_context_id
|
||||
if context.present?
|
||||
found_context = user.contexts.active.where("name like ?", "%#{context}%").first
|
||||
found_context = user.contexts.where("name like ?", "%#{context}%").first if !found_context
|
||||
# TODO: Should this use ILIKE on Postgres?
|
||||
found_context = user.contexts.active.where("name LIKE ?", "%#{context}%").first
|
||||
found_context = user.contexts.where("name LIKE ?", "%#{context}%").first if !found_context
|
||||
context_id = found_context.id if found_context
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue