Skip to content
Compare
Choose a tag to compare
@giljr giljr released this 08 May 21:50

here's a summarized version of the steps to integrate Active Admin into a Rails 7 website:

1.Setup Environment:
Download the latest version of Active Admin (v8) and prepare your VSCode
environment.
Create a new feature branch: git checkout -b add_admin_dash.
2.Gemfile Configuration:
Add Active Admin and Sassc gems to the Gemfile.
Run bundle install in the terminal.
3.Active Admin Installation:
Run rails g active_admin:install in the terminal.
4.Seed Data Setup:
Save seed data in db/seeds.rb.
5.Migration Setup:
Generate a migration file to add published_at column to posts.
Run migrations: rails db:migrate and seed data: rails db:seed.
6.Model Registration:
Register models in Active Admin: Post, User, and Comment.
7.Customization:
Customize each Active Admin resource file: posts.rb, users.rb, and comments.rb.
8.Model Modifications:
Modify model files (post.rb, user.rb, comment.rb) to include ransackable attributes.
9.Controller Modifications:
Modify comments_controller.rb and posts_controller.rb to handle curse words in
comments and posts.
10.Dashboard Customization:
Customize the dashboard page in dashboard.rb.
11.Localization:
Add localization for the dashboard in en.yml.
12.Curse Words Configuration:
Create an initializer file to configure curse words.
13.Database Setup:
Drop, migrate, and seed the database.
14.Route Configuration:
Configure routes in config/routes.rb.

These steps guide you through integrating Active Admin into a Rails 7 website, including setting up models, controllers, views, and configuring the dashboard.

"Thank you for downloading this project 😍️"

Full Changelog: noticed_v2...v14