trains is a demo blog built with Rails that follows best practices and is easy to enhance.
Some of the features of trains:
- Internationalization
- GraphQL API
- ActionText Support
Needed a rails application to test my ideas on.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of
ruby.
To get trains, follow these steps:
git clone https://github.com/2kabhishek/trains
cd trains
bundle install
rails serverUsing I18n:
Currently, trains supports only English and Spanish.
Visit http://localhost:3000/es to see the blog in Spanish.
Trains also supports GraphQL.
To use GraphQL, visit http://localhost:3000/graphql and enter the following query:
query {
posts {
id
title
content
}
}trains was built using rails
Setting up action text with Rails 7 was a bit tricky.
- Explored more rails concepts
- Using I18n for model translations with the
after_findcallback
Will try out more ideas when needed.
Hit the β button if you found this useful.
