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 = '[email protected]'
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'
There are a few things you need in your app to get things looking just right.
- Add a to_s method to your user model. The following example assumes a column in my user model called
name
:
class User < ActiveRecord::Base
def to_s
name
end
end
For more information see the full-fledged rails app