Webring Widget Sample

Webring for Rails Gem Version

Webring for Rails (webring-rails) is a flexible engine for creating and managing a webring system in your Ruby on Rails application. A webring is a collection of websites linked together in a circular structure, allowing visitors to navigate from one site to another.

Features

  • Complete MVC structure for managing webring members
  • Circular navigation system between member websites
  • One-line route configuration with webring_routes helper (similar to Devise)
  • UID-based member identification for security
  • Embeddable JavaScript widget for easy member site integration
  • Customizable widget appearance and behavior
  • Optional membership request system for sites to apply to join the webring
  • Generators for easy setup and customization
  • Extensible architecture for adding custom features

Installation

Add this line to your application's Gemfile:

gem 'webring-rails'

Run:

# Install the gem
bundle install

# Create the member model and migrations
rails generate webring:member

# Create the navigation controller
rails generate webring:navigation_controller

Configure Routes

Add the webring_routes helper to your config/routes.rb:

# config/routes.rb
Rails.application.routes.draw do
  webring_routes
  # ... other routes
end

Optional Features

# Enable the membership request system
rails generate webring:membership_request

# Add membership request controller and routes
rails generate webring:membership_requests_controller

Finally, run the migrations:

rails db:migrate

Route Configuration

Basic Usage

# Default configuration
webring_routes

Custom Controllers

# Use custom controllers
webring_routes navigation: :custom_navigation, widget: :custom_widget

Advanced Configuration

# Full customization
webring_routes(
  navigation: :my_navigation,
  widget: :my_widget,
  mount_path: '/network'
)

Documentation

For detailed documentation on models, controllers, modules, widget customization, and more advanced installation options, please visit the Webring Rails Wiki.

License

The gem is available as open source under the terms of the MIT License.