Skip to content
This repository

Gem for adding uservoice feedback to Ruby on Rails

branch: master
README.rdoc

Uservoice feedback for Ruby on Rails

This adds Uservoice support to your Rails application including single sign-on.

Installation

As a gem

gem install uservoice --source http://gemcutter.org

As a Rails dependency

config.gem 'uservoice', :source => 'http://gemcutter.org'

As a Rails plugin

./script/plugin install http://github.com/iltempo/uservoice.git

Configuration

Generate files for your app:

./script/generate uservoice <key> <forum> [<api_key>]

Where <key> is the Uservoice account name and <forum> the id of your main forum. Find both settings in widgets section of the admin interface of Uservoice. Your API key <api_key> can be found in the API section of the admin documentation.

Default properties are stored in a file named uservoice.yml in the config directory of your Rails application. Make it fitting to your needs. Feel free to use erb expressions.

Add javascript function and configuration to HTML HEAD section of your template file:

<%= uservoice_config_javascript %>

You can override default uservoice settings in your view:

<%= uservoice_config_javascript(:alignment => 'right', :forum => 12983) %>

Single Sign-On

Single sign-on authenticates your users automatically against the Uservoice service. A second login is not needed any more.

Uservoice is allowing single sign-on starting from the Bronze plan. uservoice.com/signup?ref=nav

To use single sign-on with on uservoice you have to set your api_key in config/uservoice.yml. Find it on ACCOUNT.uservoice.com/admin2/docs#/legacy_api

The user properties can be set via the :sso parameter.

<%= uservoice_config_javascript(:sso => {:guid => @current_user.id, :email => @current_user.email}) %>

Parameter :guid should be unique identifier, for example the user id in your system. Uservoice recommends setting :email parameter to enable users to get updates and notifications via email. See ACCOUNT.uservoice.com/admin2/docs#/sso for a list of parameters available.

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don't break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

This project is using Semantic Versioning.

Author

Alexander Greim

Contributors

Eric Wollesen

Copyright

Copyright © 2010 il tempo - Alexander Greim, released under the MIT license

Something went wrong with that request. Please try again.