Module: Common
- Included in:
- ApplicationController, LoginController
- Defined in:
- lib/common.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.like_operator ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/common.rb', line 10 def self.like_operator # HACK: 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 |
Instance Method Details
#set_theme ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/common.rb', line 2 def set_theme if prefs && prefs.theme @user_theme = prefs.theme.parameterize.underscore else @user_theme = SITE_CONFIG['default_theme'] || 'light_blue' end end |