Make sure you have a Ruby on Rails app using atleast version 8.0.0
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!
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
Check out my videos on Youtube
[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.