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.13.3 app/models/refine/stored_filter.rb
refine-rails-2.13.2 app/models/refine/stored_filter.rb
refine-rails-2.13.1 app/models/refine/stored_filter.rb
refine-rails-2.13.0 app/models/refine/stored_filter.rb
refine-rails-2.12.2 app/models/refine/stored_filter.rb
refine-rails-2.12.1 app/models/refine/stored_filter.rb
refine-rails-2.12.0 app/models/refine/stored_filter.rb
refine-rails-2.11.12 app/models/refine/stored_filter.rb
refine-rails-2.11.11 app/models/refine/stored_filter.rb
refine-rails-2.11.10 app/models/refine/stored_filter.rb
refine-rails-2.11.9 app/models/refine/stored_filter.rb
refine-rails-2.11.8 app/models/refine/stored_filter.rb
refine-rails-2.11.6 app/models/refine/stored_filter.rb
refine-rails-2.11.5 app/models/refine/stored_filter.rb
refine-rails-2.11.4 app/models/refine/stored_filter.rb
refine-rails-2.11.3 app/models/refine/stored_filter.rb
refine-rails-2.11.2 app/models/refine/stored_filter.rb
refine-rails-2.11.1 app/models/refine/stored_filter.rb
refine-rails-2.11.0 app/models/refine/stored_filter.rb
refine-rails-2.10.1 app/models/refine/stored_filter.rb