module ContentfulRails
A collection of useful things to help make it easier to integrate Contentful into your Rails app. It includes view helpers, a Webhook handler, caching, and a Rails Engine
to hook it all together.
Constants
- VERSION
Version number
Attributes
configuration[RW]
Public Class Methods
active_record_available?()
click to toggle source
# File lib/contentful_rails.rb, line 30 def self.active_record_available? Module.const_get('ActiveRecord::Migration') rescue NameError false end
configure() { |configuration| ... }
click to toggle source
# File lib/contentful_rails.rb, line 19 def self.configure self.configuration ||= Configuration.new yield(configuration) end
include_migrations_to_active_record()
click to toggle source
# File lib/contentful_rails.rb, line 24 def self.include_migrations_to_active_record return unless active_record_available? ActiveRecord::Migration.send(:include, ContentfulModel::Migrations::Migration) end