diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/paginable.rb | 4 | ||||
-rw-r--r-- | app/models/setting.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/concerns/paginable.rb b/app/models/concerns/paginable.rb index 9e95cd649..6061bf9bd 100644 --- a/app/models/concerns/paginable.rb +++ b/app/models/concerns/paginable.rb @@ -6,8 +6,8 @@ module Paginable included do scope :paginate_by_max_id, ->(limit, max_id = nil, since_id = nil) { query = order(arel_table[:id].desc).limit(limit) - query = query.where(arel_table[:id].lt(max_id)) unless max_id.blank? - query = query.where(arel_table[:id].gt(since_id)) unless since_id.blank? + query = query.where(arel_table[:id].lt(max_id)) if max_id.present? + query = query.where(arel_table[:id].gt(since_id)) if since_id.present? query } end diff --git a/app/models/setting.rb b/app/models/setting.rb index e0107dd83..340552581 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -13,7 +13,7 @@ # class Setting < RailsSettings::Base - source Rails.root.join('config/settings.yml') + source Rails.root.join('config', 'settings.yml') def to_param var |