https://github.com/kontent-ai/sample-app-ruby
A sample Rails application displaying items from Kontent.ai with the Ruby SDK
https://github.com/kontent-ai/sample-app-ruby
headless kontent-ai kontent-ai-sample mvc ruby ruby-on-rails sample-app
Last synced: over 1 year ago
JSON representation
A sample Rails application displaying items from Kontent.ai with the Ruby SDK
- Host: GitHub
- URL: https://github.com/kontent-ai/sample-app-ruby
- Owner: kontent-ai
- License: mit
- Fork: true (kentico-ericd/kontent-ruby-rails-sample)
- Created: 2022-09-27T07:44:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-12-18T13:38:31.000Z (over 1 year ago)
- Last Synced: 2024-12-18T14:45:42.690Z (over 1 year ago)
- Topics: headless, kontent-ai, kontent-ai-sample, mvc, ruby, ruby-on-rails, sample-app
- Language: Ruby
- Homepage: https://docs.kontent.ai/tutorials/develop-apps/get-started/run-sample-app?tech=ruby
- Size: 1.08 MB
- Stars: 0
- Watchers: 0
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
> [!IMPORTANT]
> This sample app relies on the Dancing Goat project, which is no longer available for creation in Kontent.ai.
>
> If you still wish to use this project, you can import the Dancing Goat project using the [Data Ops](https://github.com/kontent-ai/data-ops) tool by following the instructions provided in our [Dancing Goat repository](https://github.com/kontent-ai-bot/dancing-goat).
# Kontent.ai Rails Sample Application
[](https://discord.gg/SKCxwPtevJ) [](https://stackoverflow.com/tags/kontent-ai)
This basic Rails application demonstrates how to create a Rails application using the [Kontent.ai Ruby SDK](https://github.com/kontent-ai/delivery-sdk-ruby) and a [sample project](https://docs.kontent.ai/tutorials/manage-kontent/projects/manage-projects#a-create-a-sample-project).
See [Build your first Ruby on Rails app](https://docs.kontent.ai/tutorials/develop-apps/get-started/build-your-first-app?tech=ruby) for a detailed walkthrough of how the sample application was developed.

## Install & Run
- Clone the repository
- Run `bundle install`
- You can change the source Kontent.ai project to your own project to be able to change the content. If you don't have your own Sample Project, any admin of a Kontent.ai subscription [can generate one](https://app.kontent.ai/sample-site-configuration).
- If you want to connect to custom project ID, Open the **app/controllers/application_controller.rb** file and set your project ID on this line:
`PROJECT_ID = ''.freeze`
- Run `rails server`. Your application will be accessible at **localhost:3000**
## Features
- Loads articles from Kontent.ai asynchronously via [render_async](https://github.com/renderedtext/render_async)
- Rich text component rendering via [`InlineContentItemResolver`](https://github.com/kontent-ai/delivery-sdk-ruby#resolving-inline-content)
- Content item link resolution via [`ContentLinkResolver`](https://github.com/kontent-ai/delivery-sdk-ruby#resolving-links)