Skip to content

alienlifeform/thredded_gem

 
 

Repository files navigation

Thredded (the gem / rails engine)

Installation

Add the gem to your Gemfile:

gem 'thredded'

Add an initializer to your app: config/initializers/thredded.rb

Thredded.user_class = 'User'
Thredded.email_incoming_host = 'incoming.example.com'
Thredded.email_from = 'no-reply@example.com'
Thredded.email_outgoing_prefix = '[Thredded] '

Copy the migrations over to your parent application and migrate:

rake thredded:install:migrations db:migrate db:test:prepare

Mount the thredded engine in your routes file:

mount Thredded::Engine => '/forum'

Add rails-4 friendly "friendly_id" to your gem file

gem 'friendly_id', github: 'norman/friendly_id'

Get Your App Ready

There are a few things you need in your app to get things looking just right.

  1. Add a to_s method to your user model. The following example assumes a column in my user model called name:
  • name also seems to be required via (messageboards/index latest_user_for(messageboard) -> messageboard.topics.first.last_user.name)
class User < ActiveRecord::Base
  def to_s
    name
  end
end

For more information see the full-fledged rails app

  1. Navigate to your mount location /new to create a new messageboard
  • need to explain options here (logged in vs. members)
  • messageboard should be letters,numbers,dash and underscore only and 1-16 characters

About

Thredded forum engine (WIP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 98.7%
  • Other 1.3%