A Mountable Forum...
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config/locales
db/migrate
lib
script
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
mountable_forum.gemspec

README.md

MountableForum

Mountable Forum is Selectra's Forum Solution. No registration, just an activable reCaptcha.

Dependencies

Mountable Forum works with Rails 3.2.

Installation

Add the selectra gems source to your Gemfile :

source 'http://gems.selectra.info'

Then add the gem to your Gemfile :

gem 'mountable_forum'

Call bundle install to install it for your application.

Go to your config/routes.rb and add the following line ine it :

forum_at('/forum') # indicates the forum URL

Install the migrations with

rake mountable_forum_engine:install:migrations
rake db:migrate

Create an initializer like config/initializers/mountable_forum.rb to set the site name to use in the mail messages:

MountableForum.configure do |config|
  config.site_name = "My Super Site"
end

Usage

Go to http://yourapp/forum. That's it !

Configuration

As seen previously, you need to create an initializer to set the site name:

# config/initializers/mountable_forum.rb
MountableForum.configure do |config|
  config.site_name = "My Super Site"
end

reCaptcha

To enable reCaptcha in your forum, just enable it in your initializer:

MountableForum.configure do |config|
  config.site_name = "My Super Site"

  config.enable_recaptcha = true
end

Set your reCaptcha credentials in the same initializer or in a specific one:

# config/initializers/recaptcha.rb
Recaptcha.configure do |config|
  config.public_key  = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
  config.private_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
end

Customizing the views

MountableForum provides a set of views that you can override if needed.

All messages

To override the index of the forum, override the app/views/messages/index.html.erb view.

The default one just includes a partial so you can copy it if you just want to add stuff around it.

<%= render partial: 'index', locals: { messages: @messages } %>

A specific message

You can override this one by writing the app/views/messages/show.html.erb view.

<%= render partial: 'messages/show', locals: { message: @message } %>

The new message form

Same principle with app/views/message/new.html.erb:

<%= render partial: 'new', locals: { message: @message } %>