theodi / juvia_rails

Painfully simple Rails integration for Juvia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Dependency Status Coverage Status Code Climate Gem Version License Badges

JuviaRails

This gem adds a helper for embedding Juvia comments into a Rails app.

License

This code is open source under the MIT license. See the LICENSE.md file for full details.

Requirements

  • Rails ~> 3.2.x

Usage

Include in your gemfile:

gem 'juvia_rails', github: 'theodi/juvia_rails'

Create a config/initializers/juvia_rails.rb file, with the following content:

JuviaRails.configure do |config|
  
  config.server_url    = 'http://your_juvia_server.example.com'
  config.site_key      = 'your_juvia_site_key_here'
  
  config.comment_order = 'earliest-first' # 'latest-first' by default
  config.include_css = false # true by default

end

Then, in your views, you can just call:

<%= juvia_comments %>

If you want to specify a topic key manually, you can:

<%= juvia_comments @topic_key %>

About

Painfully simple Rails integration for Juvia

License:MIT License


Languages

Language:Ruby 100.0%