Skip to content

Instantly share code, notes, and snippets.

View bricesanchez's full-sized avatar
🎯
Focusing

Brice Sanchez bricesanchez

🎯
Focusing
View GitHub Profile
@bricesanchez
bricesanchez / Spree: Filter by brand.md
Last active August 29, 2015 14:27 — forked from maxivak/Spree: Filter by brand.md
Spree: Filter Products by properties

Fix 'scoped' error for Rails 4

error: undefined method 'scoped' solution:

# config/initializers/scoped.rb
class ActiveRecord::Base
  # do things the modern way and silence Rails 4 deprecation warnings
 def self.scoped(options=nil)

options ? where(nil).apply_finder_options(options, true) : where(nil)

@bricesanchez
bricesanchez / Gemfile
Created May 29, 2015 13:06
Spree 3.x + Refinery 3.x Gemfile
source 'https://rubygems.org'
ruby '2.2.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'
# Use sqlite3 as the database for Active Record
gem 'pg'
gem 'puma'