Loft
Character CMS media assets plugin
Installation
Add to Gemfile:
gem 'loft'
Setup a new model for assets asset.rb:
class Asset
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::SerializableId
include Mongoid::LoftAsset
end
Add controller for asset model to make it accesible via CMS, e.g. app/controllers/admin/assets_controller.rb:
class Admin::AssetsController < Admin::BaseController
mongosteen
has_scope :by_type
json_config({ methods: [ :list_item_thumbnail, :created_ago ] })
end
Add admin assets controller to routes.rb:
resources :assets
Add to admin.scss:
@import "loft";
Add to admin.coffee character configuration object:
assets: new Loft('Library', 'asset', '/admin/assets')
Loft family
- Mongosteen: An easy way to add restful actions for mongoid models
- Character: A simple and lightweight javascript library for building data management web apps
- Inverter: An easy way to connect Rails templates content to CMS
Credits
Inverter is maintained and funded by Slate Studio, LLC. Tweet your questions or suggestions to @slatestudio and while you’re at it follow us too.
License
Copyright © 2015 Slate Studio, LLC. Character is free software, and may be redistributed under the terms specified in the license.
