Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update README.md

  • Loading branch information...
commit 9a92ec39e40abc8b84a7896395f0f040e33194fd 1 parent 54e6d38
Adrian Macneil authored

Showing 1 changed file with 17 additions and 3 deletions. Show diff stats Hide diff stats

  1. +17 3 README.md
20 README.md
Source Rendered
@@ -8,7 +8,9 @@ it's still quite a lot of work to use your own authentication.
8 8
9 9 For this reason, it seemed easiest to configure Spreee to use RefineryCMS for authentication.
10 10
11   -Install Refinery:
  11 +## Installation
  12 +
  13 +Create a new Refinery app:
12 14
13 15 gem install refinerycms
14 16 refinerycms refinery_spree
@@ -25,7 +27,9 @@ Update [config/routes.rb](https://github.com/adrianmacneil/refinery_spree/blob/m
25 27
26 28 root :to => "refinery/pages#home"
27 29
28   -Add WillPaginate initializer monkey patch to [config/initializers/will_paginate.rb](https://github.com/adrianmacneil/refinery_spree/blob/master/config/initializers/will_paginate.rb)
  30 +RefineryCMS uses WillPaginage for pagination, while Spree uses Kaminari. Unfortunately, the two don't cooperate.
  31 +Add the following monkey patch to [config/initializers/will_paginate.rb](https://github.com/adrianmacneil/refinery_spree/blob/master/config/initializers/will_paginate.rb)
  32 +to fix this error:
29 33
30 34 if defined?(WillPaginate)
31 35 module WillPaginate
@@ -38,7 +42,12 @@ Add WillPaginate initializer monkey patch to [config/initializers/will_paginate.
38 42 end
39 43 end
40 44
41   -Fix refinery_user? error message:
  45 +When you visit a RefineryCMS page, you will see the following unhelpful error message:
  46 +
  47 + NoMethodError in Refinery/pages#home
  48 + undefined method `refinery_user?' for #<#<Class:0x007f8a2c762bf0>:0x007f8a2f2a42f0>
  49 +
  50 +I'm not exactly sure what causes this, but it's easy to fix (see [RefineryCMS Issue #1804](https://github.com/resolve/refinerycms/issues/1804)). Simply add the following line to [app/controllers/application_controller.rb](https://github.com/adrianmacneil/refinery_spree/blob/master/app/controllers/application_controller.rb):
42 51
43 52 class ApplicationController < ActionController::Base
44 53 protect_from_forgery
@@ -91,3 +100,8 @@ Open http://localhost:3000/refinery and create an admin user for yourself. Then
91 100 Refinery::User.first.spree_roles << Spree::Role.find_or_create_by_name("admin")
92 101
93 102 All done! Now you can access Refinery at http://localhost:3000/refinery and Spree at http://localhost:3000/admin
  103 +
  104 +## Helpful links:
  105 +
  106 +* https://github.com/spree/spree/pull/1512
  107 +* http://ryanbigg.com/spree-guides/authentication.html

0 comments on commit 9a92ec3

Please sign in to comment.
Something went wrong with that request. Please try again.