Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@
generate 'solidus:auth:install'
end

gem "flickwerk", "~> 0.3.5"
gem 'responders'
gem 'solidus_support', '>= 0.12.0'
gem 'view_component', '~> 3.0'
gem 'tailwindcss-rails', '~> 3.0'
gem 'view_component', '~> 3.0'

gem_group :test do
# We need to add capybara along with a javascript driver to support the provided system specs.
Expand Down Expand Up @@ -120,6 +121,8 @@
RUBY

application <<~RUBY
include Flickwerk

if defined?(FactoryBotRails)
initializer after: "factory_bot.set_factory_paths" do
require 'spree/testing_support/factory_bot'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module ProductFeaturedSimilarProducts
module ProductFeaturedSimilarProductsPatch
def self.prepended(base)
base.scope :featured, -> { where(featured: true) }
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module TaxonCustomQueries
module TaxonCustomQueriesPatch
def featured(limit = 3)
all_products.featured.order('RANDOM()').limit(limit)
end
Expand Down