lib/ui_bibz/ui/ux/tables/components/store.rb in ui_bibz-3.0.0.beta14 vs lib/ui_bibz/ui/ux/tables/components/store.rb in ui_bibz-3.0.0.beta15
- old
+ new
@@ -6,9 +6,12 @@
class Store
attr_accessor :records
# Store Use WillPaginate store methods
def initialize(store)
+ raise 'Store is nil!' if store.nil?
+ raise 'Store can be created only with "table_search_pagination" method!' if store.try(:records).nil?
+
@records = store.records
@store = store
@model = store.model
end