Sha256: 7504090a4adea6cad3cb6e38e2d8d73569f798142ebc95fd73cc28389fd3c741
Contents?: true
Size: 497 Bytes
Versions: 1
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true class Product < ActiveRecord::Base has_many :variations, class_name: 'ProductVariation', inverse_of: :product validates :title, presence: true searchable do |o| o.relation :variations, :title, :stock_status o.keyed :title o.keyed :description o.keyed :rating o.keyed :title_length do Arel::Nodes::NamedFunction.new('LENGTH', [ arel_table[:title] ]) end o.unkeyed :title o.unkeyed :description end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pursuit-0.2.0 | spec/internal/app/models/product.rb |