
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
= ECM CMS 2
= End-User documentation
Please look at the[link:doc] Folder.
= Migrating from 1.x.x to 2.0.0
Add active_admin-awesome_nested_set to your gemfile, if you are using activeadmin:
# Gemfile
gem 'active_admin-awesome_nested_set'
= Prerequisites
if you are using activeadmin as backend, ecm_cms2 comes with admin files to provide a backend. In that case, you'll need active_admin-awesome_nested_set. Add it to your gemfile:
# Gemfile
gem 'active_admin-awesome_nested_set'
= Installation
Add it to your bundle:
gem 'ecm_cms2'
Install your bundle:
bundle install
Install the intializer:
rails g ecm:cms:install
Install the locales
rails g ecm:cms:locales
Generate migrations and migrate:
rake ecm_cms_engine:install:migrations rake db:migrate
= Configuring localized routing
Add the routes to your routing file:
localized do Ecm::Cms::Routing.routes(self) end root to: redirect("/#{I18n.locale}")
= Optional: Generating example/default data
There is a task to prepopulate your database tables with example data.
Warning: RUNNING THIS WILL DELETE ALL OF YOUR CMS DATA AND REPLACE IT WITH EXAMPLE DATA!
rake ecm:cms:db:populate!
= Linking to pages
<%= link_to 'My Page', page_path(i18n_locale: I18n.locale, page: 'my-page') %>
= Using partials form the database in other controllers
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
prepend_view_path ::Ecm::Cms::PartialResolver.instance
...
end
= Using the navigation helper
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
helper Ecm::CmsHelper
...
end
Then you can render navigation in your views:
# app/views/_navigation.rb
= cms_render_navigation(:main)
= Running specs
gem install bundler
bundle
cd spec/dummy && rake db:migrate RAILS_ENV=test && cd ../..
guard
= License
This project rocks and uses MIT-LICENSE.
FAQs
Unknown package
We found that ecm_cms2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.