Sha256: 97b97df2c35605ec4675c798d78ecaf02cfbaaafeca0be62acc76d5f7de0e2cf

Contents?: true

Size: 374 Bytes

Versions: 36

Compression:

Stored size: 374 Bytes

Contents

module Refine
  class StoredFilter < ApplicationRecord
    validates_presence_of :state
    self.table_name = "refine_stored_filters"

    def refine_filter(initial_query: nil)
      Refine::Rails.configuration.stabilizer_classes[:db].new.from_stable_id(id: id, initial_query: initial_query)
    end

    def blueprint
      JSON.parse(state)["blueprint"]
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
refine-rails-2.10.0 app/models/refine/stored_filter.rb
refine-rails-2.9.14 app/models/refine/stored_filter.rb
refine-rails-2.9.13 app/models/refine/stored_filter.rb
refine-rails-2.9.12 app/models/refine/stored_filter.rb
refine-rails-2.9.11 app/models/refine/stored_filter.rb
refine-rails-2.9.10 app/models/refine/stored_filter.rb
refine-rails-2.9.9 app/models/refine/stored_filter.rb
refine-rails-2.9.8 app/models/refine/stored_filter.rb
refine-rails-2.9.7 app/models/refine/stored_filter.rb
refine-rails-2.9.6 app/models/refine/stored_filter.rb
refine-rails-2.9.5 app/models/refine/stored_filter.rb
refine-rails-2.9.4 app/models/refine/stored_filter.rb
refine-rails-2.9.3 app/models/refine/stored_filter.rb
refine-rails-2.9.2 app/models/refine/stored_filter.rb
refine-rails-2.9.1 app/models/refine/stored_filter.rb
refine-rails-2.9.0 app/models/refine/stored_filter.rb