Simplified version of spree_static_pages
without localisation overhead
-
Add this extension to your Gemfile with this line:
gem 'spree_pages', github: 'public-market/spree_pages'
-
Install the gem using Bundler:
bundle install
-
Copy & run migrations
bundle exec rails g spree_pages:install
-
Restart your server
If your server was running, restart it so that it can find the assets properly.
-
Install ckeditor:
-
Add ckeditor to js:
In our case it's
vendor/assets/javascripts/spree/backend/all.js
Add this line before
//= require_tree .
//= require ckeditor/init
-
Add ckeditor to necessary fields in forms:
Create new js file
ckeditorInit.js
invendor/assets/javascripts/spree/backend
$(function() { var editableIds = ['page_content'] editableIds.forEach(function(id) { if ($("#" + id).length) { CKEDITOR.replace(id); } }) });
This script will add ckeditor to all fields with ids from
editableIds
array. In this case it'spage_content
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app
.
bundle
bundle exec rake
If you'd like to contribute, please take a look at the instructions for installing dependencies and crafting a good pull request.
Copyright (c) 2018 Abundance Labs, Inc., released under the New BSD License