This basic Rails application demonstrates how to create a Rails application using the Kontent.ai Ruby SDK and a sample project.
See Build your first Ruby on Rails app for a detailed walkthrough of how the sample application was developed.
- 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.
- 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 = '<your-project-ID>'.freeze
- 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:
- Run
rails server
. Your application will be accessible at localhost:3000
- Loads articles from Kontent.ai asynchronously via render_async
- Rich text component rendering via
InlineContentItemResolver
- Content item link resolution via
ContentLinkResolver