-
Notifications
You must be signed in to change notification settings - Fork 638
Docs: Installation and Setup
Andrew vonderLuft edited this page Apr 26, 2024
·
6 revisions
Note: Comfy has been inactive for awhile but has been revived in the Occams project.
- Rails 5.2 or 6.0
- File attachments are handled by ActiveStorage. You will need to copy over database migrations by running
rails active_storage:install
- To resize attached images you'll need to have ImageMagic installed.
- Pagination is handled by either Kaminari or WillPaginate. Make sure you have one defined in your Gemfile.
Add to the Gemfile of your Rails project:
gem 'comfortable_mexican_sofa', '~> 2.0.0'
Then from your Rails project's folder run these commands:
bundle install
rails generate comfy:cms
rake db:migrate
The generator will create the initializer, database migration, example CMS Seeds and will move route sets.
Take a look at routes.rb
and make sure that the content serving route appears last:
comfy_route :cms_admin, path: '/admin'
comfy_route :cms, path: "/"
Note: All routes appearing after comfy_route :cms
will not be accessible as it's a
globbing route. This includes routes included
by other Rails Engines. Make sure that everything looks ok by running rails routes
and confirming that comfy_cms_render_page
appears last.