ComfortableMexicanSofa is a powerful Ruby on Rails 5.2+ CMS (Content Management System) Engine
MIT License
Bot releases are hidden (Show)
Published by GBH almost 11 years ago
ComfortableMexicanSofa::Routing.admin
you have to use comfy_route :cms_admin
. This new format allows wrapping all cms routes in your custom constraints or things like namespaces (although be careful with those)cms
prefix. So if before you had data-rich-text
, now it's data-cms-rich-text
. There was a conflict with datetime picker that required this change.Published by GBH almost 11 years ago
rake db:migrate
.CmsSite
, CmsLayout
, CmsPage
, CmsSnippet
are changed to Cms::Site
, Cms::Layout
, Cms::Page
and Cms::Snippet
. It only matters if you directly manipulate those objects somehow.Published by GBH almost 11 years ago
rake db:migrate
.revisions_limit
: [[https://github.com/comfy/comfortable-mexican-sofa/raw/master/config/initializers/comfortable_mexican_sofa.rb]]Published by GBH almost 11 years ago
content_prefix_path
is an attribute of the Site now. This way if you want to serve pages from http://localhost/en/
you need to set up a Site with hostname localhost
and path en
.Published by GBH almost 11 years ago
@site.files.for_category('red_category', 'blue_category')
rails g comfy:cms
if running Rails 3.0Published by GBH almost 11 years ago
rails g comfy:cms
to refresh CSS.Published by GBH almost 11 years ago
find_by_slug
method is failing you want to replace it with find_by_identifier
. Sites have identifiers now too.rails g comfy:cms
if not using asset pipeline.rake paperclip:refresh CLASS=Cms::File
Published by GBH almost 11 years ago
config.upload_file_options
. Now default attachment url
is set to /system/:class/:id/:attachment/:style/:filename
instead of /system/:attachment/:id/:style/:filename
. This means you'll need to move directories to adjust for this change. Not a problem if you never uploaded any files through CMS, or have your own override in place.Published by GBH almost 11 years ago
Published by GBH almost 11 years ago
{{ cms:page:content:markdown }}
Published by GBH almost 11 years ago
rails g comfy:cms
and move newly created routes (they'll probably end up at the top of the file), or manually paste this at the bottom of your routes.rb: ComfortableMexicanSofa::Routing.content :path => '/', :sitemap => false
. You should also add this, if you want to access admin area: ComfortableMexicanSofa::Routing.admin :path => '/cms-admin'
app/assets/stylesheets/comfortable_mexican_sofa/admin/application.css
(.sass/.scss/.whatever). For javascript, same idea: app/assets/javascripts/comfortable_mexican_sofa/admin/application.js
(.coffee?).Published by GBH almost 11 years ago
Cms::BaseController
if you want to automatically load @cms_site
Admin::Cms::BaseController
rails g comfy:scaffold User email:string full_name:string
. This will create a model, controller, views, routes and even tests.Published by GBH about 11 years ago
ApplicationController
but if you don't want before_filters kicking in you may create your own controller and use that. See: config.base_controller
inside initializer.Published by GBH about 11 years ago
page.content
is created on access. No need to recompute it for all pages when related content changes. This change should speed things up especially on sites with tons of content.config.reveal_cms_partials
Published by GBH over 11 years ago
Published by GBH over 11 years ago
CMS Fixtures import/export functionality is completely rewritten. Notable (and potentially breaking) changes:
attributes.yml
file instead of _{page_slug}.yml
target_page
attributeattributes.yml
See example fixture files for structure reference. Run rails g comfy:cms
to update them.