Skip to content

indigotechtutorials/easy-blog-gem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

A ruby gem to help you add blog apps to your app easily.

Prerequisites

Make sure you have a Ruby on Rails app using atleast version 8.0.0

Installation guide

Step 1. Install the gem

  bundle add easy_blog

Step 2. Run the generator to create blog code

  rails g easy_blog

Step 3. Create new blog posts!

Start you app and go over to localhost:3000/admin/blog_posts to create and manage your blog posts.

Step 4. Enjoy you newly created blog posts

Go to localhost:3000/blog and you will see your new blog posts listed!

Using with Devise gem for users

Make sure you have a user model that responds to admin? method. This gem uses the default authentication so if you are using Devise than you must update the code in the app/controllers/admin/blog_posts_controller.rb file and change the authorize_admin method to use current_user instead of Current.user

Built by Indigo Tech Tutorials

Check out my videos on Youtube

Todo:

[x] Add a generator which creates blog models and routes [x] Add an admin route that is scoped to a method on the user model. for example user.admin? this could be configured to anything.

About

A ruby gem that adds a blog to your app in seconds!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published