No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Easy way for create contents using rails_admin
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
>= 2.7.0, ~> 2.7
>= 4.7.0, ~> 4.7
>= 1.6.3, ~> 1.6
>= 2.4.3, ~> 2.4
< 6, >= 5.0
>= 1.3.0, ~> 1.3
~> 10.0
>= 2.53.4, ~> 2.53

Runtime

>= 1.2.0, ~> 1.2
>= 5.1.0, ~> 5.1
>= 2.1.0, ~> 2.1
>= 4.5.1, ~> 4.5
>= 1.0.0, ~> 1.0
>= 1.0.6, ~> 1.0
>= 4.0.0, ~> 4.0
 Project Readme

Rails Admin Content Builder

Build Status Code Climate Coverage Status Issue Count

Easy way for create contents using rails_admin.

Preview

content-min

Demonstration

Content Builder
Content generated

Requirements

Dependencies

MiniMagick

Supported ORM

ActiveRecord

Supported Asset Plugin

CarrierWave

Installation

Test with rails < 5 and TurboLink < 5

Add this line to your application's Gemfile:

gem 'rails_admin'
gem 'rails_admin_content_builder'

Run the generator and migrations

rails g rails_admin_content_builder
rake db:migrate

Add styles in app/assets/application.scss

*= require rails_admin_content_builder

Usage

For custom model, see: Customizing Model

Include in your controller

include RailsAdminContentBuilder::ContentBuilderHelpers

Example

class PostsController < ApplicationController
  include RailsAdminContentBuilder::ContentBuilderHelpers

  def index
  end

  def show
  end
end
# Return all objects contents
@contents = all_contents_created

# Return especific object content
@content = find_content_created_by_slug('your-slug')

# Return content
@content = find_content_created_by_slug('your-slug')
@content.content_sanitized

In your show content view

<article>
  <h1><%= @content.title %></h1>
  <p>
    <%= @content.written_by %>
  </p>
  <p><%= @content.summary %></p>

<%= @content.content_sanitized %>
</article>

Run tests

bundle exec rake rspec

Attributes and Methods

# Attributes
"title" : String    
"written_by" : String    
"date_publish" : DateTime    
"content" : Text    
"status" : Boolean           
"slug" : String    

# Methods
content_sanitized : Text
content_builder_images : Object

Run tests

bundle exec rake
rspec

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/luizpicolo/rails_admin_content_builder. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.