/contentful_rails_tutorial

A Simple Rails Application using Contentful and the Product Template

Primary LanguageRubyMIT LicenseMIT

Rails Product Demo

Simple Rails and Contentful Application. This application is for Demo purposes.

Contentful is a content management platform for web applications, mobile apps and connected devices. It allows you to create, edit & manage content in the cloud and publish it anywhere via powerful API. Contentful offers tools for managing editorial teams and enabling cooperation between organizations.

Setup

  • Install dependencies
bundle install
  • Create and Seed Database
bundle exec rake db:create db:migrate db:seed
  • Run Server
bundle exec rails s

Viewing Data

The seed comes pre-loaded with a Read-Only Demo space. You can view the content here

Using Custom Data

You can create your own Custom Data by following these steps:

  • Create an Account in Contentful or Log In
  • Create a new Space with Product Template
  • In the rails app, create a new Contentful Configuration with (obtained from Contentful App):
    • Your newly created Space ID - Settings -> Space -> Space ID
    • Production Delivery API Access Token - APIs -> API Keys -> Website -> Production
    • Product's Content Type ID - Content Types -> Product -> JSON Preview -> "sys => id" (sys is the Metadata block of the Content Type)
  • Then press Show on your new Configuration to see it's contents

Tutorial

For a Tutorial on how to create your own Rails Application using Contentful, you can read here