Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.19 KB

readme.MD

File metadata and controls

39 lines (23 loc) · 1.19 KB

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.