mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
19 lines
462 B
Ruby
19 lines
462 B
Ruby
module Common
|
|
def set_theme
|
|
if prefs && prefs.theme
|
|
@user_theme = prefs.theme.parameterize.underscore
|
|
else
|
|
@user_theme = SITE_CONFIG['default_theme'] || 'light_blue'
|
|
end
|
|
end
|
|
|
|
def self.like_operator
|
|
# This is something of a hack to use the correct operator for Pg
|
|
if ActiveRecord::Base.connection.adapter_name.downcase.to_sym == :postgresql
|
|
like = 'ILIKE'
|
|
else
|
|
like = 'LIKE'
|
|
end
|
|
return like
|
|
end
|
|
end
|