Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/2kabhishek/trains

Simple blog built with Rails 🚂🖊️
https://github.com/2kabhishek/trains

action-text blog demo graphql i18n learning rails ruby

Last synced: 4 days ago
JSON representation

Simple blog built with Rails 🚂🖊️

Awesome Lists containing this project

README

        

trains


License


People


Stars


Forks


Watches


Last Updated

Simple blog built with Rails 🚂🖊️

trains Demo


trains screenshot

## What is this

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

## Inspiration

Needed a rails application to test my ideas on.

## Prerequisites

Before you begin, ensure you have met the following requirements:

- You have installed the latest version of `ruby`.

## Getting trains

To get trains, follow these steps:

```bash
git clone https://github.com/2kabhishek/trains
cd trains
bundle install
rails server
```

## Using trains

Using 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:

```js
query {
posts {
id
title
content
}
}
```

## How it was built

trains was built using `rails`

## Challenges faced

Setting up action text with Rails 7 was a bit tricky.

## What I learned

- Explored more rails concepts
- Using I18n for model translations with the `after_find` callback

## What's next

Will try out more ideas when needed.

Hit the ⭐ button if you found this useful.

## More Info

Source | Website