Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 🚂🖊️
- Host: GitHub
- URL: https://github.com/2kabhishek/trains
- Owner: 2KAbhishek
- License: gpl-3.0
- Created: 2022-01-27T13:51:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T07:35:43.000Z (8 months ago)
- Last Synced: 2024-05-01T16:27:08.571Z (7 months ago)
- Topics: action-text, blog, demo, graphql, i18n, learning, rails, ruby
- Language: Ruby
- Size: 135 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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