LiferayContent

LiferayContent is a gem library providing access to content hosted on Liferay portal (www.liferay.com). It works through the Liferay web service (JSON version). So far, only Article can be retrieved.

Installation

Add it to your Gemfile:

gem "liferay_content"

Configure your Rails (or Ruby) application to use the related Liferay server. For example, in Rails, create a liferay_content.rb file inside the initializers folder and place inside this file the configuration:

LiferayContent.setup do |config|
  config.host     = "www.your-liferay-host.com"
  config.port     = 80
  config.uri      = "/tunnel-web/secure/json"
  config.group_id = 112345
  config.    = "[email protected]"
  config.password = "abcde"
end

Usage

Controller

Retrieve the article content from a controller:

@content = LiferayContent::Article.get(39860).html_safe

View

Display the content in a view:

<%= @content %>