README.md in wcc-contentful-0.2.1 vs README.md in wcc-contentful-0.2.2
- old
+ new
@@ -3,11 +3,11 @@
## Installation
Add this line to your application's Gemfile:
```ruby
-gem 'wcc-contentful'
+gem 'wcc-contentful', require: 'wcc/contentful/rails'
```
And then execute:
$ bundle
@@ -19,20 +19,23 @@
## Configure
```ruby
WCC::Contentful.configure do |config|
config.access_token = <CONTENTFUL_ACCESS_TOKEN>
+ config.preview_token = <CONTENTFUL_PREVIEW_TOKEN>
config.space = <CONTENTFUL_SPACE_ID>
config.default_locale = "en-US"
end
```
## Usage
```ruby
-redirect_object = WCC::Contentful::Redirect.find_by_slug('new')
+redirect_object = WCC::Contentful::Model::Redirect.find_by({slug: 'published-redirect'}, preview: false)
+redirect_object.href
-redirect_object.location
+preview_redirect_object = WCC::Contentful::Model::Redirect.find_by({slug: 'draft-redirect'}, preview: true)
+preview_redirect_object.href
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.