百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

simple_discussion

> 编程语言
开源

一个简单、可扩展的 Rails 论坛

376 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个简单、可扩展的 Rails 论坛

SimpleDiscussion - Forum engine for Ruby on Rails

SimpleDiscussion is a Rails forum gem extracting the GoRails forum. It includes categories, simple moderation, the ability to mark threads as solved, and more.

Out of the box, SimpleDiscussion comes with styling for Bootstrap v4 but you're free to customize the UI as much as you like by installing the views and tweaking the HTML.

Installation

Before you get started, SimpleDiscussion requires a User model in your application (for now).

Add this line to your application's Gemfile:

ruby
gem 'simple_discussion'

And then execute:

bash
bundle

Install the migrations and migrate:

bash
rails simple_discussion:install:migrations
rails db:migrate

Add SimpleDiscussion to your User model. The model must have name method which will be used to display the user's name on the forum. Currently only a model named User will work, but this will be fixed shortly.

ruby
class User  "/forum"

Lastly, add the CSS to your application.css to load some default styles.

scss
*= require simple_discussion

Usage

To get all the basic functionality, the only thing you need to do is add a link to SimpleDiscussion in your navbar.

erb

This will take the user to the views inside the Rails engine and that's all you have to do!

Customizing All The Things!

If you'd like to customize the views that SimpleDiscussion uses, you can install the views to your Rails app:

bash
rails g simple_discussion:views

You can also install a copy of the SimpleDiscussion controllers for advanced customization:

bash
rails g simple_discussion:controllers

Helpers are available for override as well. They are used for rendering the user avatars, text formatting, and more.

bash
rails g simple_discussion:helpers

NOTE: Keep in mind that the more customization you do, the tougher gem upgrades will be in the future.

Email And Slack Notifications

By default, SimpleDiscussion will attempt to send email and slack notifications for users subscribed to threads. To turn these off you can do the following in config/initializers/simple_discussion.rb

ruby
SimpleDiscussion.setup do |config|
  config.send_email_notifications = false # Default: true
  config.send_slack_notifications = false # Default: true
end

Slack notifications require you to set simple_discussion_slack_url in your config/secrets.yml. If you don't have this value set, it will not attempt Slack notifications even if they are enabled.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/excid3/simple_discussion. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

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

Code of Conduct

Everyone interacting in the SimpleDiscussion project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言