app/models/search.rb in blacklight-5.9.3 vs app/models/search.rb in blacklight-5.9.4
- old
+ new
@@ -3,13 +3,16 @@
belongs_to :user
serialize :query_params
- if Rails::VERSION::MAJOR < 4
+ if Blacklight::Utils.needs_attr_accessible?
attr_accessible :query_params
-
- scope :none, where(:id => nil).where("id IS NOT ?", nil)
+ end
+
+ unless respond_to?(:none)
+ # polyfill
+ scope :none, where(id: nil).where("id IS NOT ?", nil)
end
# A Search instance is considered a saved search if it has a user_id.
def saved?
self.user_id?